Wasp start
Hi when running wasp start im getting an error
[ Client!] node:internal/modules/package_json_reader:268
[ Client!] throw new ERR_MODULE_NOT_FOUND(packageName, fileURLToPath(base), null);
[ Client!] ^
[ Client!]
[ Client!] Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'tinyglobby' imported from /home/bryan/PetTreat/pets/app/.wasp/out/web-app/node_modules/vite/dist/node/cli.js
[ Client!] at Object.getPackageJSONURL (node:internal/modules/package_json_reader:268:9)
[ Client!] at packageResolve (node:internal/modules/esm/resolve:768:81)
[ Client!] at moduleResolve (node:internal/modules/esm/resolve:854:18)
[ Client!] at defaultResolve (node:internal/modules/esm/resolve:984:11)
[ Client!] at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:685:12)
[ Client!] at #cachedDefaultResolve (node:internal/modules/esm/loader:634:25)
[ Client!] at ModuleLoader.resolve (node:internal/modules/esm/loader:617:38)
[ Client!] at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:273:38)
[ Client!] at ModuleJob._link (node:internal/modules/esm/module_job:135:49) {
[ Client!] code: 'ERR_MODULE_NOT_FOUND'
[ Client!] }
[ Client!]
[ Client!] Node.js v22.14.0. What is causing this?
3 Replies
Hi @Bruno Njeru. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
It looks like you're encountering a module resolution error when running
wasp start
. The error indicates that the package 'tinyglobby' cannot be found, which is likely causing your client-side application to fail to start.
This type of error can occur for several reasons in a Wasp application:
1. Node version incompatibility: You're using Node.js v22.14.0, which is quite recent. Wasp works best with Node.js LTS versions, particularly Node 18. According to the knowledge sources, there have been issues with newer Node versions.
2. Corrupted node_modules: Sometimes the dependencies in your project's node_modules directory can become corrupted.
3. Missing dependencies: The specific package 'tinyglobby' that's missing might be a dependency of Vite (which Wasp uses for the client).
Here are some steps you can try to resolve this issue:
1. Try using Node.js 18: As mentioned in the knowledge sources, Wasp recommends using Node.js 18 LTS. You can switch to it using a version manager like nvm.
2. Clean your Wasp project: Run the following command to clean your project:
This will delete the .wasp
directory and node_modules, allowing for a fresh start Discord support thread.
3. Start your project again:
If the issue persists after trying these steps, it might be related to a specific configuration in your project or a compatibility issue with your environment. In that case, you might want to share more details about your project structure or try creating a minimal example that reproduces the issue to get more targeted help.
Let me know if these steps help resolve your issue!
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
Sorry @Bruno Njeru, 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?Great. wasp clean did the trick
Hey @Bruno Njeru glad you solved it!
Anything else I can help you with (I'm not a bot so ask away 🙂