W
Wasp-langβ€’5mo ago
lazi

Building SDK error

Hello! I'm trying to set-up a starter template via WSL. All good and dandy until i tried to start and got this error: 🐝 --- Building SDK... ------------------------------------------------------------ [ Wasp ] server/index.ts(1,15): error TS2305: Module '"@prisma/client"' has no exported member 'PrismaClient'. ❌ --- [Error] Your wasp project failed to compile: ------------------------------- - SDK build failed with exit code: 2 ❌ --- [Error] Compilation of wasp project failed: -------------------------------- 1 errors found Any fixes to this? Am I missing something? Thank you!
17 Replies
kapa.ai
kapa.aiβ€’5mo ago
Hi @lazi. 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 the PrismaClient is not being exported from the @prisma/client module. This could be due to a few reasons: 1. The @prisma/client package might not be installed or might not be correctly installed in your project. You can try reinstalling it using npm install @prisma/client or yarn add @prisma/client depending on your package manager. 2. There might be a version mismatch between Prisma and Wasp. Ensure that you're using compatible versions of both. You can check the Wasp GitHub issues (https://github.com/wasp-lang/wasp/issues/631) for any known compatibility issues. 3. The PrismaClient might not be correctly generated. You can try regenerating it using the prisma generate command. If none of these solutions work, I would recommend creating a new issue in the Wasp GitHub repository (https://github.com/wasp-lang/wasp/issues) providing all the details of your problem. The Wasp team or the community might be able to provide more specific help. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @lazi, 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?
lazi
laziOPβ€’5mo ago
Worked via manual installation ! Thanksies bot @kapa.ai , what about wasp-bin: /mnt/o/Prezi/node_modules/.bin/prisma: streamingProcess: exec: invalid argument (Bad file descriptor)
kapa.ai
kapa.aiβ€’5mo ago
Let me check the knowledge base for you. One moment! :books: ---------------------- The error message you're seeing seems to be related to a problem with the prisma executable in your project's node_modules/.bin directory. This could be due to a few reasons: 1. The prisma package might not be correctly installed in your project. You can try reinstalling it using npm install prisma or yarn add prisma depending on your package manager. 2. There might be a problem with the file permissions of the prisma executable. You can try changing the permissions using the chmod command. 3. The error might be related to the use of WSL. There are known issues with certain operations in WSL due to differences in how file systems are handled between Windows and Linux. You can check the Wasp Discord support thread (https://discord.com/channels/686873244791210014/1220992539163623527) for more information on this. If none of these solutions work, I would recommend creating a new issue in the Wasp GitHub repository (https://github.com/wasp-lang/wasp/issues) providing all the details of your problem. The Wasp team or the community might be able to provide more specific help. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @lazi, 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?
lazi
laziOPβ€’5mo ago
@kapa.ai Error generating embeddings: PineconeConnectionError: Request failed to reach Pinecone. This can occur for reasons such as incorrect configuration (environment, project id, index name), network problems that prevent the request from being completed, or a Pinecone API outage. Check your client configuration, check your network connection, and visit https://status.pinecone.io/ to see whether any outages are ongoing.
Pinecone Status
Welcome to Pinecone's home for real-time and historical data on system performance.
kapa.ai
kapa.aiβ€’5mo ago
Let me check the knowledge base for you. One moment! :books: ---------------------- The error message you're seeing indicates that there's a problem with the connection to Pinecone. This could be due to a few reasons: 1. Incorrect Configuration: Ensure that your environment variables, project id, and index name are correctly set up. You can check your .env.server file and your main.wasp file to verify this. 2. Network Problems: There might be issues with your network that are preventing the request from reaching Pinecone. You can try checking your network connection. 3. Pinecone API Outage: There might be an ongoing outage with the Pinecone API. You can check the Pinecone status page (https://status.pinecone.io/) to see if there are any ongoing outages. If none of these solutions work, I would recommend reaching out to the Wasp community on the Wasp Discord server (https://discord.com/channels/686873244791210014/1203689209894928404) or creating a new issue in the Wasp GitHub repository (https://github.com/wasp-lang/wasp/issues) providing all the details of your problem. The Wasp team or the community might be able to provide more specific help. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @lazi, 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?
lazi
laziOPβ€’5mo ago
@kapa.ai [ Db ] [cause]: Error: getaddrinfo ENOTFOUND controller.us-east-1.pinecone.io [ Db ] at GetAddrInfoReqWrap.onlookupall [as oncomplete] (node:dns:120:26) { [ Db ] errno: -3008, [ Db ] code: 'ENOTFOUND', [ Db ] syscall: 'getaddrinfo', [ Db ] hostname: 'controller.us-east-1.pinecone.io' [ Db ] } [ Db ] } [ Db ] }
kapa.ai
kapa.aiβ€’5mo ago
Let me check the knowledge base for you. One moment! :books: ---------------------- The error message you're seeing indicates that the hostname 'controller.us-east-1.pinecone.io' could not be resolved. This could be due to a few reasons: 1. Network Problems: There might be issues with your network that are preventing the hostname from being resolved. You can try checking your network connection. 2. DNS Issues: The DNS server might be unable to resolve the hostname. You can try using a different DNS server. 3. Incorrect Configuration: Ensure that your environment variables, project id, and index name are correctly set up. You can check your .env.server file and your main.wasp file to verify this. If none of these solutions work, I would recommend reaching out to the Wasp community on the Wasp Discord server (https://discord.com/channels/686873244791210014/1203689209894928404) or creating a new issue in the Wasp GitHub repository (https://github.com/wasp-lang/wasp/issues) providing all the details of your problem. The Wasp team or the community might be able to provide more specific help. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @lazi, 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?
lazi
laziOPβ€’5mo ago
Hmmm i can't get it to generate embeddings into the db @kapa.ai node:internal/modules/esm/resolve:210 const resolvedOption = FSLegacyMainResolve(packageJsonUrlString, packageConfig.main, baseStringified); ^ Error: Cannot find package
kapa.ai
kapa.aiβ€’5mo ago
Let me check the knowledge base for you. One moment! :books: ---------------------- The error message you're seeing indicates that Node.js is unable to find a package that your application is trying to import. This could be due to a few reasons: 1. The package might not be installed in your project. You can try installing it using npm install <package-name> or yarn add <package-name> depending on your package manager. 2. The package might not be correctly listed in your package.json file. You can check this file to ensure that the package is listed under the dependencies or devDependencies section. 3. There might be a typo in the import statement in your code. Ensure that the package name is spelled correctly and that the case matches exactly. If none of these solutions work, I would recommend creating a new issue in the Wasp GitHub repository (https://github.com/wasp-lang/wasp/issues) providing all the details of your problem. The Wasp team or the community might be able to provide more specific help. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @lazi, 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?
martinsos
martinsosβ€’5mo ago
@lazi you actually shouldn't be installing prisma on your own, so that recommendation from the bot is not the best! Can you help me out by providing more info? Which template were you trying to use, and how did you install it, which command? Was it embeddings template and you picked it in the wizard after running wasp new? What is your wasp version? Does wasp work well for you on other projects of yours? As for generating stuff in the Pinecone database via seeding -> have you correctly provided the API key and other stuff in the .env.server? @lazi you can also share the zip of the whole project with us if you feel comfortable with that so we can try to reproduce it Because I just tried creating a fresh app from embeddings template and all seems to be fine on my side, so I can't reproduce it at the moment.
lazi
laziOPβ€’5mo ago
So - I haven't really tried doing anything fancy, just setting up the examples on my machine so i can try around. As for the project zip, it's basically what's generated with nothing added. I've tried embeddings and the ask-the-document project. Just now i've tried setting up opensaas but i get the same problem
[ Server ] Yup, still not done installing. [ Server!] npm error Exit handler never called! [ Server!] npm error This is an error with npm itself. Please report this error at: [ Server!] npm error https://github.com/npm/cli/issues [ Server!] npm error A complete log of this run can be found in: /home/lazi/.npm/_logs/2024-07-18T10_30_54_674Z-debug-0.log βœ… --- Successfully completed npm install. ---------------------------------------- 🐝 --- Setting up database... ----------------------------------------------------- wasp-bin: /mnt/o/XXXXXX/Lexa/app/node_modules/.bin/prisma: streamingProcess: exec: invalid argument (Bad file descriptor)
Wasp version is 0.14.0 It's more likely a problem with my environment, not wasp for sure. I'm trying this through WSL (ubuntu 24.04). @martinsos the error above is from the fresh install of saas the workaround with installing prisma manually, even though it might not be the good route, worked. I'm not working on aything critical, just prototyping some tools for myself at the moment as for this i also managed to make it work - it was a problem on my end's account (it used pods and needed the upgraded account). Worked in the end
martinsos
martinsosβ€’5mo ago
I am worried that hack with manual installation of Prisma will bit you later at some point. I think you are right that it is probably connected with your environemnt, however a lto of people use wasp on WSL so I would love to help with this specific case if I can. I see you had an npm error there. Anything interesting in that .log file? I am wondering if Prisma installation from npm failed, might be the reason why it can't find it. Becuse after installation, there should be prisma in node_modules/.bin, but it seems like it is not there in your case. What if you create a fresh wasp project with wasp new -t saas, you said you still get the error? Could you please share exact output / error you get? Btw one "silly" think to check -> might it be possible that somewhere in the directory sturcture above your Wasp project you have prisma alrady installed? some node_modules/ dir above it? For example, if you wasp app is in /home/lazi/projects/MyWaspApp, maybe you also have node_modules/ in /home/lazi/projects or /home/lazi or even in /home? We noticed that can sometimes cause wissues with prisma.
lazi
laziOPβ€’5mo ago
Will come back to this tomorrow and try to reproduce on my end and give the info πŸ˜„
martinsos
martinsosβ€’5mo ago
When you do also plz let me know your node version
lazi
laziOPβ€’4mo ago
[ Server!] npm warn deprecated [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. [ Server!] npm warn deprecated @humanwhocodes/[email protected]: Use @eslint/config-array instead [ Server!] npm warn deprecated [email protected]: Rimraf versions prior to v4 are no longer supported [ Server!] npm warn deprecated [email protected]: Glob versions prior to v9 are no longer supported [ Server!] npm warn deprecated @humanwhocodes/[email protected]: Use @eslint/object-schema instead [ Server ] Yup, still not done installing. [ Server!] npm error Exit handler never called! [ Server!] npm error This is an error with npm itself. Please report this error at: [ Server!] npm error https://github.com/npm/cli/issues [ Server!] npm error A complete log of this run can be found in: /home/lazi/.npm/_logs/2024-07-25T08_02_22_455Z-debug-0.log βœ… --- Successfully completed npm install. ---------------------------------------- 🐝 --- Setting up database... ----------------------------------------------------- wasp-bin: /mnt/o/XXXXXXXXX/XXXXXXXXX/XXXXXXXXX/node_modules/.bin/prisma: streamingProcess: exec: invalid argument (Bad file descriptor) Okay - I've manged to replicate it on a fresh install of embeddings. I can send you the log files in a private DM to analyze :D. As for the node_modules above the project, I couldn't find any. Node version 22.5.0
martinsos
martinsosβ€’4mo ago
@lazi oh ok problem is in node version! So node version 22.5 has a bug, that is not related to Wasp. They fixed it a day or so ago with 22.5.1, so update your node version and you should be good.
lazi
laziOPβ€’4mo ago
Oh sweet
Want results from more Discord servers?
Add your server