Wasp start db
I'm getting an error when running wasp start bdb ❌ --- [Error] Your wasp project failed to compile: -------------------------------
- The "compilerOptions.typeRoots" field is missing in tsconfig.json, you must set it to: ["node_modules/@testing-library","node_modules/@types"].
7 Replies
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:
----------------------
The error message you're seeing indicates that your project's tsconfig.json is missing the required compilerOptions.typeRoots field, which should be set to:
While the knowledge sources discuss the importance of having a correct tsconfig.json for Wasp projects and mention that Wasp generates or expects certain configurations for TypeScript support, they do not provide explicit instructions for this specific error or the exact required content for typeRoots. However, it is clear from the sources that Wasp relies on a properly configured tsconfig.json for both development and compilation, and that issues can arise if the configuration is missing or incorrect, especially after recent changes in Wasp's handling of TypeScript configs Docs: Project Structure, Github Issue: Ensure "user" tsconfig.json files exist and are correct.
What you should do:
1. Open your project's tsconfig.json file (located at the root of your Wasp project).
2. Add or update the compilerOptions.typeRoots field as follows:
3. Save the file and try running your Wasp command again.
If you continue to have issues, consider running wasp clean and then wasp start to ensure everything is recompiled and dependencies are reinstalled, as this can resolve some configuration-related problems Discord: pg-boss failed to start!.
If the problem persists, please provide more details about your Wasp version and any recent changes to your project setup.
----------------------
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?
Great. It's sorted out @kapa.ai
Let me check the knowledge base for you again. One moment! :books:
----------------------
I'm glad to hear it's sorted out! If you have any more questions or run into other issues with Wasp, feel free to ask.
----------------------
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?
Hey @Bruno Njeru, how did you get a
tsconfig
without those typeRoots
?I used the voting- websockets template from the wasp repo @Filip
Oh, I guess you used the one from the
main
branch (we'll soon be removing type roots, but that's in the next major release)
Pro tip: always look at the release branch. That one matches the docs and the latest version of wasp
@martinsos Can we make the release branch the default when coming to the repo? I remember there was talk about thisYup we had some motivation to do it, but then that motivation kind of lost its strength, and it wasn't clear that trade-off is worth it.
I am still open to it though, if we feel like it makes sense. We closed the issue for now though