W
Wasp•11mo ago
Zuck

Some crazy WASP error!

Hey guys! This is a different project from my main design one so its pretty new, so i can afford any breaking fixes lol. I don't know what the heck happened but i get this error:
[ Server ] > [email protected] watch
[ Server ] > nodemon --exec 'npm run bundle-and-start || exit 1'
[ Server ]
[ Client ] > [email protected] start
[ Client ] > npm run validate-env && vite
[ Client ]
[ Server ] [nodemon] 2.0.22
[ Server ] [nodemon] to restart at any time, enter `rs`
[ Server ] [nodemon] watching path(s): src/**/* ../../../src/**/* .env
[ Server ] [nodemon] watching extensions: ts,mts,js,mjs,json
[ Server ] [nodemon] starting `npm run bundle-and-start || exit 1`
[ Client ]
[ Client ] > [email protected] validate-env
[ Client ] > node -r dotenv/config ./scripts/validate-env.mjs
[ Client ]
[ Client ] šŸ” Validating environment variables...
[ Server ]
[ Server ] > [email protected] bundle-and-start
[ Server ] > npm run bundle && npm run start
[ Server ]
[ Server ]
[ Server ] > [email protected] bundle
[ Server ] > rollup --config --silent
[ Server ]
[ Client ]
[ Client ] VITE v5.2.13 ready in 321 ms
[ Client ]
[ Client ] āžœ Local: http://localhost:3000/
[ Client ] āžœ Network: http://192.168.0.128:3000/
[ Client ] āžœ press h + enter to show help
[ Server ]
[ Server ] > [email protected] start
[ Server ] > npm run validate-env && node --enable-source-maps -r dotenv/config bundle/server.js
[ Server ]
[ Server ]
[ Server ] > [email protected] validate-env
[ Server ] > node -r dotenv/config ./scripts/validate-env.mjs
[ Server ]
[ Server ] šŸ” Validating environment variables...
[ Server!] node:internal/modules/esm/resolve:264
[ Server!] throw new ERR_MODULE_NOT_FOUND(
[ Server!] ^
[ Server!]
[ Server!] Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/Users/jacobferrari/Documents/RecruitAI/RecruitAI/.wasp/out/sdk/wasp/dist/ext-src/queries.js.js' imported from /Users/jacobferrari/Documents/RecruitAI/RecruitAI/.wasp/out/sdk/wasp/dist/server/operations/queries/index.js
[ Server!] at finalizeResolution (node:internal/modules/esm/resolve:264:11)
[ Server!] at moduleResolve (node:internal/modules/esm/resolve:924:10)
[ Server!] at defaultResolve (node:internal/modules/esm/resolve:1148:11)
[ Server!] at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:390:12)
[ Server!] at ModuleLoader.resolve (node:internal/modules/esm/loader:359:25)
[ Server!] at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:234:38)
[ Server!] at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:87:39)
[ Server!] at link (node:internal/modules/esm/module_job:86:36) {
[ Server!] code: 'ERR_MODULE_NOT_FOUND',
[ Server!] url: 'file:///Users/jacobferrari/Documents/RecruitAI/RecruitAI/.wasp/out/sdk/wasp/dist/ext-src/queries.js.js'
[ Server!] }
[ Server!]
[ Server!] Node.js v21.7.1
[ Server ] [nodemon] app crashed - waiting for file changes before starting...


šŸ‘€ --- [Warning] Your wasp project reported following warnings during compilation: ---

- Wasp was unable to verify your database is up to date. Running `wasp db migrate-dev` may fix this and will provide more info.
[ Server ] > [email protected] watch
[ Server ] > nodemon --exec 'npm run bundle-and-start || exit 1'
[ Server ]
[ Client ] > [email protected] start
[ Client ] > npm run validate-env && vite
[ Client ]
[ Server ] [nodemon] 2.0.22
[ Server ] [nodemon] to restart at any time, enter `rs`
[ Server ] [nodemon] watching path(s): src/**/* ../../../src/**/* .env
[ Server ] [nodemon] watching extensions: ts,mts,js,mjs,json
[ Server ] [nodemon] starting `npm run bundle-and-start || exit 1`
[ Client ]
[ Client ] > [email protected] validate-env
[ Client ] > node -r dotenv/config ./scripts/validate-env.mjs
[ Client ]
[ Client ] šŸ” Validating environment variables...
[ Server ]
[ Server ] > [email protected] bundle-and-start
[ Server ] > npm run bundle && npm run start
[ Server ]
[ Server ]
[ Server ] > [email protected] bundle
[ Server ] > rollup --config --silent
[ Server ]
[ Client ]
[ Client ] VITE v5.2.13 ready in 321 ms
[ Client ]
[ Client ] āžœ Local: http://localhost:3000/
[ Client ] āžœ Network: http://192.168.0.128:3000/
[ Client ] āžœ press h + enter to show help
[ Server ]
[ Server ] > [email protected] start
[ Server ] > npm run validate-env && node --enable-source-maps -r dotenv/config bundle/server.js
[ Server ]
[ Server ]
[ Server ] > [email protected] validate-env
[ Server ] > node -r dotenv/config ./scripts/validate-env.mjs
[ Server ]
[ Server ] šŸ” Validating environment variables...
[ Server!] node:internal/modules/esm/resolve:264
[ Server!] throw new ERR_MODULE_NOT_FOUND(
[ Server!] ^
[ Server!]
[ Server!] Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/Users/jacobferrari/Documents/RecruitAI/RecruitAI/.wasp/out/sdk/wasp/dist/ext-src/queries.js.js' imported from /Users/jacobferrari/Documents/RecruitAI/RecruitAI/.wasp/out/sdk/wasp/dist/server/operations/queries/index.js
[ Server!] at finalizeResolution (node:internal/modules/esm/resolve:264:11)
[ Server!] at moduleResolve (node:internal/modules/esm/resolve:924:10)
[ Server!] at defaultResolve (node:internal/modules/esm/resolve:1148:11)
[ Server!] at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:390:12)
[ Server!] at ModuleLoader.resolve (node:internal/modules/esm/loader:359:25)
[ Server!] at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:234:38)
[ Server!] at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:87:39)
[ Server!] at link (node:internal/modules/esm/module_job:86:36) {
[ Server!] code: 'ERR_MODULE_NOT_FOUND',
[ Server!] url: 'file:///Users/jacobferrari/Documents/RecruitAI/RecruitAI/.wasp/out/sdk/wasp/dist/ext-src/queries.js.js'
[ Server!] }
[ Server!]
[ Server!] Node.js v21.7.1
[ Server ] [nodemon] app crashed - waiting for file changes before starting...


šŸ‘€ --- [Warning] Your wasp project reported following warnings during compilation: ---

- Wasp was unable to verify your database is up to date. Running `wasp db migrate-dev` may fix this and will provide more info.
things are WILDING out. I think this line is key
[ Server!] url: 'file:///Users/jacobferrari/Documents/RecruitAI/RecruitAI/.wasp/out/sdk/wasp/dist/ext-src/queries.js.js'
[ Server!] url: 'file:///Users/jacobferrari/Documents/RecruitAI/RecruitAI/.wasp/out/sdk/wasp/dist/ext-src/queries.js.js'
Pretty sure it shouldn't be looking there. Something kind of similar to this happened way back when I was using direct imports but from what I see and done all my imports are relative. Heres a link to the full WASP project code: https://www.mediafire.com/file/78efctqk6a6e75h/RecruitAI.zip/file
MediaFire
RecruitAI
12 Replies
kapa.ai
kapa.ai•11mo ago
Hi @Jacob Ferrari. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: Sorry @Jacob Ferrari, 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
miho•11mo ago
Mediafire brings back memoris šŸ˜„ let me take a look Usually, you can start with sharing the Wasp file content in three backticks on each side, and it will look like this: ```wasp app RecruitAI { wasp: { version: "^0.13.2" }, title: "RecruitAI", ... } route LoginRoute { path: "/login", to: LoginPage } page LoginPage { component: import { Login } from "@src/pages/auth.tsx" } ... action processWithGPT4 { fn: import { processWithGPT4 } from "@src/actions.js" } query getUser { fn: import { getUser } from "@src/queries.js", entities: [User] } query getApplicants { fn: import { getApplicants } from "@src/queries.js", entities: [Applicant] } query getApplicant { fn: import { getApplicant } from "@src/queries.js", entities: [Applicant] } query getJob { fn: import { getJob } from "@src/queries.js", entities: [Job] } query getJobs { fn: import { getJobs } from "@src/queries.js", entities: [Job] } ... api webhookCallback { fn: import { webhookCallback } from "@src/apis", middlewareConfigFn: import { webhookCallbackMiddlewareFn } from "@src/apis", httpRoute: (POST, "/webhook/callback"), auth: false } ``` Start with running wasp clean and then again wasp start šŸ˜„ while I debug Could you try removing the .js from the @src/queries.js and just write @src/queries? And also change @src/actions.js to @src/actions`
Zuck
ZuckOP•11mo ago
haha ya fair probably better than just dropping it in mediafire. wasp clean doesnt fix it. and sure ! @miho
miho
miho•11mo ago
It works after those changes for me šŸ˜„ it seems that might have a bug at our hands @Filip
Zuck
ZuckOP•11mo ago
works!! @miho thank you!! Weird though! In my other other project it didn't matter if i put .js or .ts But i had it better organized and it was @src/server/actions.ts in my other project. Did this maybe cause it? seems unrelated. In my package.json: I get:
String does not match the pattern of "^(?:(?:@(?:[a-z0-9-*~][a-z0-9-*._~]*)?/[a-z0-9-._~])|[a-z0-9-~])[a-z0-9-._~]*$".
The name of the package.

From "name": "RecruitAI",
String does not match the pattern of "^(?:(?:@(?:[a-z0-9-*~][a-z0-9-*._~]*)?/[a-z0-9-._~])|[a-z0-9-~])[a-z0-9-._~]*$".
The name of the package.

From "name": "RecruitAI",
I had RecruitAI uppercased, i just changed it to: recruitai and it got rid of that warning. And then LAST thing. When i do wasp clean, wasp start. I get:
[ Db !] Error: P1003
[ Db !]
[ Db !] Database dev.db does not exist at /Users/jacobferrari/Documents/RecruitAI/RecruitAI/.wasp/out/db/./dev.db
[ Db !]
[ Db ] Environment variables loaded from .env
[ Db ] Prisma schema loaded from ../db/schema.prisma
[ Db ]
[ Db ] āœ” Generated Prisma Client (4.16.2 | library) to ./../../../node_modules/@prisma/client in 54ms
[ Db ] You can now start using Prisma Client in your code. Reference: https://pris.ly/d/client
[ Db ]
[ Db !] Error: P1003
[ Db !]
[ Db !] Database dev.db does not exist at /Users/jacobferrari/Documents/RecruitAI/RecruitAI/.wasp/out/db/./dev.db
[ Db !]
[ Db ] Environment variables loaded from .env
[ Db ] Prisma schema loaded from ../db/schema.prisma
[ Db ]
[ Db ] āœ” Generated Prisma Client (4.16.2 | library) to ./../../../node_modules/@prisma/client in 54ms
[ Db ] You can now start using Prisma Client in your code. Reference: https://pris.ly/d/client
[ Db ]
[ Db ] import { PrismaClient } from '@prisma/client' [ Db ] const prisma = new PrismaClient() [ Db ] --- I can fix that with
wasp db migrate-dev
wasp db migrate-dev
but i feel like thats weird to have to do after a wasp clean.
MEE6
MEE6•11mo ago
Wohooo @Jacob Ferrari, you just became a Waspeteer level 5!
miho
miho•11mo ago
Nice, thank you for the extra feedback! The Prisma erorr is more of a warning because it creates the DB file automatically so it looks worse than it is, really šŸ˜„
Zuck
ZuckOP•11mo ago
okay gotchu! @miho
After i do wasp db migrate-dev it says:
šŸ --- Setting up database... -----------------------------------------------------


[ Db ] [-] Removed tables
[ Db ] - User
[ Db ] - Applicant
[ Db ] - Stage
[ Db ] - Job
[ Db ] - Application
[ Db ] - Auth
[ Db ] - AuthIdentity
[ Db ] - Session
šŸ --- Setting up database... -----------------------------------------------------


[ Db ] [-] Removed tables
[ Db ] - User
[ Db ] - Applicant
[ Db ] - Stage
[ Db ] - Job
[ Db ] - Application
[ Db ] - Auth
[ Db ] - AuthIdentity
[ Db ] - Session
And then all errors go away if i then save a file and it recompiles. Is that all good?
miho
miho•11mo ago
Sounds about right 😊 the project looks interesting, what's the idea behind it?
Zuck
ZuckOP•11mo ago
Okay perfect! My main company needs to hire dev talent but theres a looot of initital screening involved. So i thought ill just make an AI screener for me. What it does is take a form submission, then screens them with an LLM, then if they are solid they'll talk to a conversational AI (made with vapi.ai) as an inital interview, then we have an LLM really screen that hard, and if they are over a certain score they can book a interview with my partner and I! Im making it in WASP because i'd like to allow other people to use this AI Recruitment process eventually!
martinsos
martinsos•11mo ago
Awesome! And thanks Jacob for reporting this, it is an actual bug we will be fixing!
Zuck
ZuckOP•11mo ago
No problem! glad to help and thanks again!

Did you find this page helpful?