Wasp Studio Crashing On All Apps

I think this is likely to be an issue with my setup, but every time I try and run wasp studio on a wasp app, I'm getting this error - any ideas @kapa.ai ? wasp studio ✨ Starting Wasp Studio ✨ ➜ Open in your browser: http://localhost:4000 Wasp Studio visualises your app and lets you understand how different parts of your app are connected. node:internal/errors:496 ErrorCaptureStackTrace(err); ^ Error [ERR_INTERNAL_ASSERTION]: Code: ERR_MODULE_NOT_FOUND; The provided arguments length (2) does not match the required ones (3). This is caused by either a bug in Node.js or incorrect usage of Node.js internals. Please open an issue with this stack trace at https://github.com/nodejs/node/issues at new NodeError (node:internal/errors:405:5) at assert (node:internal/assert:14:11) at getMessage (node:internal/errors:451:5) at new NodeError (node:internal/errors:379:21) at legacyMainResolve (node:internal/modules/esm/resolve:218:9) at packageResolve (node:internal/modules/esm/resolve:903:14) at moduleResolve (node:internal/modules/esm/resolve:973:20) at defaultResolve (node:internal/modules/esm/resolve:1193:11) at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:403:12) at ModuleLoader.resolve (node:internal/modules/esm/loader:372:25) { code: 'ERR_INTERNAL_ASSERTION' } Node.js v18.19.0 ❌ --- [Error] Studio command failed: --------------------------------------------- Studio command failed with exit code: 1
GitHub
Issues · nodejs/node
Node.js JavaScript runtime ✨🐢🚀✨. Contribute to nodejs/node development by creating an account on GitHub.
7 Replies
kapa.ai
kapa.ai4mo ago
Hi @CamBlackwood. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- I'm sorry, but the knowledge sources provided do not contain any information about Wasp Studio crashing with the specific error you shared, nor do they mention troubleshooting steps or known issues for Wasp Studio itself. The error message you posted appears to be related to Node.js module resolution, but there is no direct reference to this issue or its solution in the available documents. If you haven't already, you might want to check that your Node.js version matches the requirements for Wasp (typically Node.js 18.x, not 20.x or 19.x, as Wasp has had strict version requirements in the past) MacOS wasp command line detects latest NodeJS version but still throws Node requirement error. However, your log shows Node.js v18.19.0, which should be compatible. Since there is no explicit mention of Wasp Studio or this error in the sources, I recommend reaching out to the Wasp community on Discord or opening an issue on the Wasp GitHub repository with your error details for more targeted support. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @CamBlackwood, 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?
toticozeni
toticozeni4mo ago
One thing I can say for sure is that wasp is currently on Node v20. I hope that can fix the problem.
CamBlackwood
CamBlackwoodOP4mo ago
interestingly, gettign this error now when I switch to node 20 - I've already ran wasp start so deps should be installed 🤔
wasp studio
✨ Starting Wasp Studio ✨

➜ Open in your browser: http://localhost:4000

Wasp Studio visualises your app and lets you understand how different parts of your app are connected.

node:internal/modules/esm/resolve:214
const resolvedOption = FSLegacyMainResolve(packageJsonUrlString, packageConfig.main, baseStringified);
^

Error: Cannot find package '/Users/cameronblackwood/.local/share/wasp-lang/0.16.0/data/packages/studio/node_modules/fastify/package.json' imported from /Users/cameronblackwood/.local/share/wasp-lang/0.16.0/data/packages/studio/dist/index.js
at legacyMainResolve (node:internal/modules/esm/resolve:214:26)
at packageResolve (node:internal/modules/esm/resolve:840:14)
at moduleResolve (node:internal/modules/esm/resolve:910:20)
at defaultResolve (node:internal/modules/esm/resolve:1130:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:396:12)
at ModuleLoader.resolve (node:internal/modules/esm/loader:365:25)
at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:240:38)
at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:85:39)
at link (node:internal/modules/esm/module_job:84:36) {
code: 'ERR_MODULE_NOT_FOUND'
}

Node.js v20.11.1
wasp studio
✨ Starting Wasp Studio ✨

➜ Open in your browser: http://localhost:4000

Wasp Studio visualises your app and lets you understand how different parts of your app are connected.

node:internal/modules/esm/resolve:214
const resolvedOption = FSLegacyMainResolve(packageJsonUrlString, packageConfig.main, baseStringified);
^

Error: Cannot find package '/Users/cameronblackwood/.local/share/wasp-lang/0.16.0/data/packages/studio/node_modules/fastify/package.json' imported from /Users/cameronblackwood/.local/share/wasp-lang/0.16.0/data/packages/studio/dist/index.js
at legacyMainResolve (node:internal/modules/esm/resolve:214:26)
at packageResolve (node:internal/modules/esm/resolve:840:14)
at moduleResolve (node:internal/modules/esm/resolve:910:20)
at defaultResolve (node:internal/modules/esm/resolve:1130:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:396:12)
at ModuleLoader.resolve (node:internal/modules/esm/loader:365:25)
at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:240:38)
at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:85:39)
at link (node:internal/modules/esm/module_job:84:36) {
code: 'ERR_MODULE_NOT_FOUND'
}

Node.js v20.11.1
toticozeni
toticozeni4mo ago
I suppose you did wasp clean it before trying again? I didn't manage to reproduce this. Once we fix this startup issue, FYI, currently wasp studio is broken on Firefox. https://github.com/wasp-lang/wasp/issues/2774
CamBlackwood
CamBlackwoodOP4mo ago
yea, same issue again after running wasp clean - maybe the package itself doesn't install on wasp start for some reason 🤔
toticozeni
toticozeni4mo ago
Ah my bad when looking at the PRs we got node 20 requirement at wasp 0.16.3. But it's still weird that it doesn't work with version 18. Especially since our recommended version for your wasp 0.16.0 version is 18.18.0, dont know if it being 18.19.0 causes the problem. I would definitely recommend updating to wasp 0.16.4 though if you can. This version should work with node v20 you updated to. curl -sSL https://get.wasp.sh/installer.sh | sh should do it.
CamBlackwood
CamBlackwoodOP4mo ago
ahh, so I had it at 0.16.0 - bumped up to 0.16.4 and it worked straight away. Thanks @toticozeni !

Did you find this page helpful?