tsconfig error

Im using wasp opensaas and im getting this error when i run wasp start db wasp start db ❌ --- [Error] Analyzing wasp project failed: ------------------------------------- 4 errors found: - The "include" field is missing in tsconfig.json, you must set it to: ["src"]. - Invalid value for the "compilerOptions.outDir" field in tsconfig.json, you must set it to: ".wasp/out/user". - The "compilerOptions.composite" field is missing in tsconfig.json, you must set it to: true. - The "compilerOptions.skipLibCheck" field is missing in tsconfig.json, you must set it to: true.
3 Replies
kapa.ai
kapa.ai2mo ago
Hi @Bruno Njeru. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Based on the error message you're seeing, it appears that there are some issues with your tsconfig.json file in your Wasp OpenSaaS project. The error is indicating that certain required fields are either missing or have incorrect values. Let's address these issues: 1. First, make sure you have a tsconfig.json file in the root of your project. If it doesn't exist, you should create one. 2. Open the tsconfig.json file and add or modify the following fields:
{
"include": ["src"],
"compilerOptions": {
"outDir": ".wasp/out/user",
"composite": true,
"skipLibCheck": true
// ... other existing options ...
}
}
{
"include": ["src"],
"compilerOptions": {
"outDir": ".wasp/out/user",
"composite": true,
"skipLibCheck": true
// ... other existing options ...
}
}
These changes will address the specific errors mentioned in the error message: - Add the "include" field to specify which files should be included in compilation. - Set the correct "outDir" for compiled files. - Add the "composite" option for project references. - Add the "skipLibCheck" option to skip type checking of declaration files. After making these changes, save the tsconfig.json file and try running wasp start db again. It's worth noting that Wasp 0.12.0 introduced changes to the project structure and TypeScript configuration. If you're using an older version of Wasp or OpenSaaS, you might want to check if there are any migration steps you need to follow. For more information on Wasp's project structure and TypeScript configuration, you can refer to the following resources: - Wasp Project Structure - Migration from 0.11.X to 0.12.X If you continue to experience issues after making these changes, please let me know, and I'll be happy to help further. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @Bruno Njeru, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
Bruno Njeru
Bruno NjeruOP2mo ago
maybe its because i updated to version 0.16 Sould we update to wasp 0.16 for opensaas or should we stay with wasp 0.15
Filip
Filip2mo ago
Hey @Bruno Njeru, I think you're right. These errors are popping out because you updated Wasp to 0.16.0. Here's the guide that tells you everything you need to do: https://wasp.sh/docs/migration-guides/migrate-from-0-15-to-0-16
Sould we update to wasp 0.16 for opensaas or should we stay with wasp 0.15
You should update your app according to the above instructions, definitely! Let me know if you hit an issue and we'll work through it!

Did you find this page helpful?