First Time using opensaas, went through this error

[
Wasp ] prisma-runtime-library.d.ts(2,26): error TS2307: Cannot find module '@prisma/client/runtime' or its corresponding type declarations.
[ Wasp ] server/_types/index.ts(6,8): error TS2307: Cannot find module 'express-serve-static-core' or its corresponding type declarations.
[ 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/mimi/solutione/solutione-wasp/solutione/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'.
[ Wasp ] ../../../../node_modules/wasp/server/_types/index.ts(6,8): error TS2307: Cannot find module 'express-serve-static-core' or its corresponding type declarations.

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

- SDK build failed with exit code: 2


:x: --- [Error] Compilation of wasp project failed: --------------------------------

1 errors found
Wasp ] prisma-runtime-library.d.ts(2,26): error TS2307: Cannot find module '@prisma/client/runtime' or its corresponding type declarations.
[ Wasp ] server/_types/index.ts(6,8): error TS2307: Cannot find module 'express-serve-static-core' or its corresponding type declarations.
[ 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/mimi/solutione/solutione-wasp/solutione/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'.
[ Wasp ] ../../../../node_modules/wasp/server/_types/index.ts(6,8): error TS2307: Cannot find module 'express-serve-static-core' or its corresponding type declarations.

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

- SDK build failed with exit code: 2


:x: --- [Error] Compilation of wasp project failed: --------------------------------

1 errors found
4 Replies
kapa.ai
kapa.ai2mo ago
Hi @senorioano. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- It seems like you're encountering multiple issues related to missing modules and type declarations. Here are some steps you can take to resolve these issues: 1. Cannot find module '@prisma/client/runtime' or its corresponding type declarations: This error might be due to the Prisma client not being generated correctly. You can try regenerating the Prisma client by running npx prisma generate --schema ../db/schema.prisma as suggested in this Github issue (https://github.com/wasp-lang/wasp/issues/427). 2. Cannot find module 'express-serve-static-core' or its corresponding type declarations: This error suggests that the 'express-serve-static-core' module is missing. You might need to install it using npm. 3. File '@tsconfig/node18/tsconfig.json' not found: This error might be due to a missing or incorrectly configured tsconfig.json file. Wasp generates a "dummy" tsconfig.json file during project creation. If this file is missing, Wasp might not be able to detect it and regenerate it. You can check the existing tsconfig.json file and make sure it's configured correctly as suggested in this Github issue (https://github.com/wasp-lang/wasp/issues/939). 4. Cannot find type definition file for 'jest': This error suggests that the type definitions for Jest are missing. You might need to install the @types/jest package using npm. 5. Cannot find module 'rollup/parseAst' or its corresponding type declarations: This error suggests that the 'rollup/parseAst' module is missing. You might need to install it using npm. 6. SDK build failed with exit code: 2: This error might be due to the SDK not being compiled correctly. You can try running wasp clean and then wasp start to clean the project and start it again as suggested in this Discord thread (https://discord.com/channels/686873244791210014/1213958217537814640). Remember to run npm install after adding any new dependencies to ensure they are correctly installed. If the issues persist, it might be helpful to share your project's configuration and setup details for more specific guidance. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @senorioano, 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?
senorioano
senorioanoOP2mo ago
[ Wasp ] prisma-runtime-library.d.ts(2,26): error TS2307: Cannot find module '@prisma/client/runtime' or its corresponding type declarations. [ Wasp ] server/_types/index.ts(6,8): error TS2307: Cannot find module 'express-serve-static-core' or its corresponding type declarations. [ 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/mimi/solutione/solutione-wasp/solutione/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'. [ Wasp ] ../../../../node_modules/wasp/server/_types/index.ts(6,8): error TS2307: Cannot find module 'express-serve-static-core' or its corresponding type declarations. ❌ --- [Error] Your wasp project failed to compile: ------------------------------- - SDK build failed with exit code: 2 ❌ --- [Error] Compilation of wasp project failed: -------------------------------- 1 errors found I have this error nvmd node js version
Vinny (@Wasp)
Vinny (@Wasp)2mo ago
glad you got it worked out. what version were you on and which did you upgrade to?
Filip
Filip2w ago
If someone stumbles upon this while debugging the same problem, here's the solution: https://github.com/wasp-lang/wasp/issues/2085#issuecomment-2276137271
Want results from more Discord servers?
Add your server