Errors with tsconfig

Hello! I am currently running the saas wasp template for the very first time and I faced this problem:
> wasp db migrate-dev

🐝 --- Compiling wasp project... --------------------------------------------------


✅ --- Successfully completed npm install. ----------------------------------------


🐝 --- Setting up database... -----------------------------------------------------

✅ --- Database successfully set up. ----------------------------------------------


🐝 --- Building SDK... ------------------------------------------------------------


[ Wasp ] tsconfig.json(2,14): error TS6053: File '@tsconfig/node18/tsconfig.json' not found.
[ Wasp ] ../../../../node_modules/@testing-library/jest-dom/types/jest.d.ts(1,23): error TS2688: Cannot find type definition file for 'jest'.
[ Wasp ] ../../../../node_modules/@testing-library/jest-dom/types/jest.d.ts(9,27): error TS2304: Cannot find name 'expect'.
[ Wasp ] ../../../../node_modules/vitest/node_modules/vite/dist/node/index.d.ts(5,41): error TS2307: Cannot find module 'rollup/parseAst' or its corresponding type declarations.
[ Wasp ] There are types at '/home/jorge/SimplyUp/app/node_modules/vitest/node_modules/rollup/dist/parseAst.d.ts', but this result could not be resolved under your current 'moduleResolution' setting. Consider updating to 'node16', 'nodenext', or 'bundler'.

❌ --- [Error] Your wasp project failed to compile: -------------------------------

- SDK build failed with exit code: 2
> wasp db migrate-dev

🐝 --- Compiling wasp project... --------------------------------------------------


✅ --- Successfully completed npm install. ----------------------------------------


🐝 --- Setting up database... -----------------------------------------------------

✅ --- Database successfully set up. ----------------------------------------------


🐝 --- Building SDK... ------------------------------------------------------------


[ Wasp ] tsconfig.json(2,14): error TS6053: File '@tsconfig/node18/tsconfig.json' not found.
[ Wasp ] ../../../../node_modules/@testing-library/jest-dom/types/jest.d.ts(1,23): error TS2688: Cannot find type definition file for 'jest'.
[ Wasp ] ../../../../node_modules/@testing-library/jest-dom/types/jest.d.ts(9,27): error TS2304: Cannot find name 'expect'.
[ Wasp ] ../../../../node_modules/vitest/node_modules/vite/dist/node/index.d.ts(5,41): error TS2307: Cannot find module 'rollup/parseAst' or its corresponding type declarations.
[ Wasp ] There are types at '/home/jorge/SimplyUp/app/node_modules/vitest/node_modules/rollup/dist/parseAst.d.ts', but this result could not be resolved under your current 'moduleResolution' setting. Consider updating to 'node16', 'nodenext', or 'bundler'.

❌ --- [Error] Your wasp project failed to compile: -------------------------------

- SDK build failed with exit code: 2
My setup is:
> wasp version
0.13.2

> npm -v
10.7.0

> node -v
v18.20.3

> nvm -v
0.39.7
> wasp version
0.13.2

> npm -v
10.7.0

> node -v
v18.20.3

> nvm -v
0.39.7
Thanks for your help
5 Replies
kapa.ai
kapa.ai7mo ago
Hi @Jorge Alemán. 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 suggests that there's an issue with your tsconfig.json file. Specifically, it seems like the file @tsconfig/node18/tsconfig.json is not found, and there are also issues with finding type definitions for 'jest' and a module 'rollup/parseAst'. From the knowledge sources, there are a few discussions around tsconfig.json files in Wasp projects. In one Github issue (https://github.com/wasp-lang/wasp/issues/1430), it's mentioned that the Wasp team is figuring out how to handle tsconfig files in user projects. In another Github issue (https://github.com/wasp-lang/wasp/issues/939), it's suggested that Wasp should manage tsconfig.json files, checking if they exist, regenerating them if they don't, and fixing them if something is wrong. Based on these discussions, it seems like your issue might be related to the management of tsconfig.json files in Wasp. However, without more specific information on how Wasp handles these files, it's hard to provide a definitive solution. As a first step, you could check if the tsconfig.json file exists in your project and if it's correctly configured. If it doesn't exist or if it's misconfigured, you might need to regenerate it or fix the configuration. If the issue persists, I would recommend reaching out to the Wasp community or the Wasp team directly for more specific guidance. They might be able to provide more insights based on the specific error messages you're seeing. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @Jorge Alemán, 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?
miho
miho7mo ago
Could you maybe try with Node 20 🙂 nvm use 20 wasp clean wasp start It's an issue we are actively investigating, sorry about that. cc: @martinsos
Jorge Alemán
Jorge AlemánOP7mo ago
I added the dev dependency and then it worked.
"devDependencies": {
"@tsconfig/node18": "latest",
"devDependencies": {
"@tsconfig/node18": "latest",
Node 20 without the dependency worked, thanks @miho !
martinsos
martinsos7mo ago
Yup, thanks for the report, this just started happening a couple of days ago, we will be jumping on it in the following days! @Jorge Alemán this might help us fix it: what is your OS?
Want results from more Discord servers?
Add your server