Error while compiling the project

[ 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
9 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: ---------------------- Based on the errors you've provided, it seems like there are several 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 suggests that the Prisma client is not installed or not correctly installed. You can try reinstalling it. Also, ensure that you're using a compatible version of Node.js with Prisma. There was an issue reported with Node.js version 16.15.1 (source (https://github.com/wasp-lang/wasp/issues/631)). 2. Cannot find module 'express-serve-static-core' or its corresponding type declarations: This error suggests that the Express.js module is not installed or not correctly installed. You can try reinstalling it. 3. File '@tsconfig/node18/tsconfig.json' not found: This error suggests that the TypeScript configuration file is not found. Make sure that the file exists and is correctly referenced in your project. 4. Cannot find type definition file for 'jest': This error suggests that the Jest type definitions are not installed or not correctly installed. You can try reinstalling them. 5. Cannot find module 'rollup/parseAst' or its corresponding type declarations: This error suggests that the Rollup module is not installed or not correctly installed. You can try reinstalling it. 6. SDK build failed with exit code: 2: This error suggests that there was a problem building the SDK. You can try running wasp clean to delete all .wasp and node_modules stuff and then wasp start to reinstall everything again (source (https://discord.com/channels/686873244791210014/1215750573278629958)). Remember to always check your Node.js and Wasp versions to ensure compatibility. You can check your Wasp version with wasp version. If you're still encountering issues, consider reaching out to the Wasp community or opening an issue on the Wasp GitHub page. ---------------------- 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
@kapa.ai how can i reinstall prisma client
kapa.ai
kapa.ai2mo ago
Let me check the knowledge base for you. One moment! :books: ---------------------- To reinstall Prisma Client, you can follow these steps: 1. Navigate to your project directory. 2. Delete the node_modules directory and package-lock.json file. You can do this with the following commands:
rm -rf node_modules
rm package-lock.json
rm -rf node_modules
rm package-lock.json
3. Reinstall your dependencies, including Prisma Client, by running:
npm install
npm install
4. Finally, generate the Prisma Client:
npx prisma generate
npx prisma generate
This should reinstall Prisma Client and generate the necessary client code. If you're still encountering issues, ensure that your package.json file includes @prisma/client in the dependencies. ---------------------- 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
now i have this issue
MEE6
MEE62mo ago
Wohooo @senorioano, you just became a Waspeteer level 1!
senorioano
senorioanoOP2mo ago
@kapa.ai
kapa.ai
kapa.ai2mo ago
Let me check the knowledge base for you. One moment! :books: 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?
Vinny (@Wasp)
Vinny (@Wasp)2mo ago
I think upgrading your node version fixed this, right @senorioano ? Kapa bot is wrong on this one and you shouldn't have to install prisma. Wasp will take care of that for you.
Filip
Filip2w ago
If someone stumbles upon this issue looking for a fix, try this: https://github.com/wasp-lang/wasp/issues/2085#issuecomment-2276137271
Want results from more Discord servers?
Add your server