Unable to start wasp
I am getting the following error when trying to start wasp. I am running MacOS 15.2
[ Server ] > rollup --config --silent
[ Client!] ✘ [ERROR] Expected identifier but found "import"
[ Client!]
[ Client!] (define name):1:0:
[ Client!] 1 │ import.meta.dirname
[ Client!] ╵ ~~
[ Client!] ✘ [ERROR] Expected identifier but found "import"
[ Client!] (define name):1:0:
[ Client!] 1 │ import.meta.filename
[ Client!] ╵ ~~
[ Client!] ✘ [ERROR] Expected identifier but found "import"
[ Client!] (define name):1:0:
[ Client!] 1 │ import.meta.url
[ Client!] ╵ ~~
[ Client!] failed to load config from /Users/nic/MerchantLens/.wasp/out/web-app/vite.config.ts
[ Client!] error when starting dev server:
[ Client!] Error: Build failed with 3 errors:
[ Client!] (define name):1:0: ERROR: Expected identifier but found "import"
[ Client!] (define name):1:0: ERROR: Expected identifier but found "import"
[ Client!] (define name):1:0: ERROR: Expected identifier but found "import"
[ Client!] at failureErrorWithLog (/Users/nic/MerchantLens/.wasp/out/web-app/node_modules/esbuild/lib/main.js:1476:15)
[ Client!] at /Users/nic/MerchantLens/.wasp/out/web-app/node_modules/esbuild/lib/main.js:945:25
[ Client!] at runOnEndCallbacks (/Users/nic/MerchantLens/.wasp/out/web-app/node_modules/esbuild/lib/main.js:1316:45)
[ Client!] at buildResponseToResult (/Users/nic/MerchantLens/.wasp/out/web-app/node_modules/esbuild/lib/main.js:943:7)
[ Client!] at /Users/nic/MerchantLens/.wasp/out/web-app/node_modules/esbuild/lib/main.js:970:16
[ Client!] at responseCallbacks.<computed> (/Users/nic/MerchantLens/.wasp/out/web-app/node_modules/esbuild/lib/main.js:622:9)
[ Client!] at handleIncomingPacket (/Users/nic/MerchantLens/.wasp/out/web-app/node_modules/esbuild/lib/main.js:677:12)
[ Client!] at Socket.readFromStdout (/Users/nic/MerchantLens/.wasp/out/web-app/node_modules/esbuild/lib/main.js:600:7)
[ Client!] at Socket.
4 Replies
Hi @nicop. 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 error message you've provided, it appears you're encountering an issue with starting your Wasp application on MacOS 15.2. The error suggests there's a problem with the Vite configuration file and how it's interpreting certain JavaScript syntax.
This issue is likely related to the Node.js version you're using. Wasp has specific Node.js version requirements, and using an incompatible version can lead to errors like the one you're seeing.
Here are a few steps you can try to resolve this issue:
1. Check your Node.js version:
Make sure you're using a compatible Node.js version. According to the Wasp Quick Start guide (https://wasp-lang.dev/docs/quick-start#requirements), Wasp requires Node.js version 18 or 20.
2. Update Node.js:
If you're not using a compatible version, update to Node.js 18 or 20. You can use a version manager like nvm to easily switch between Node.js versions.
3. Clean the Wasp project:
Try running
wasp clean
in your project directory to remove any cached or generated files that might be causing issues.
4. Reinstall dependencies:
After cleaning, try reinstalling the project dependencies by running npm install
in both the root directory and the .wasp/out/web-app
directory.
5. Start Wasp again:
After completing the above steps, try running wasp start
again.
If you're still encountering issues after trying these steps, it would be helpful to check:
- The exact version of Wasp you're using (wasp version
)
- The exact version of Node.js you're using (node --version
)
- Any recent changes you've made to your project configuration
If the problem persists, you might want to consider sharing more details about your project setup or reaching out to the Wasp community on their Discord channel (https://discord.com/channels/686873244791210014/1179895919471247490) for more specific assistance.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
Sorry @nicop, 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?Tracking it here: https://github.com/wasp-lang/wasp/issues/2425
Sorry about that! Wasp is currently broken because our
esbuild
dependency is broken. Hopefully by the end of the day they'll release a new version and Wasp will start working again.
In the meantime, we'll work on fix on our side and make Wasp more resilient to these kind of changes.GitHub
Fix esbuild 0.24.1 issue · Issue #2425 · wasp-lang/wasp
Describe the bug wasp start command fails on a newly created example to do project. With this error. I have been using wasp for over a month now, my project failed today with an error. When I try n...
👍
Should be fixed now 😊