500 error code just after upgrading to 3.15v
I am getting the following 500 error code just after upgrading to 3.15v
500
Unexpected token ';'
at createScript (node:vm:269:10)
at Object.runInThisContext (node:vm:317:10)
at ViteNodeRunner.runModule (./node_modules/vite-node/dist/client.mjs:398:19)
at ViteNodeRunner.directRequest (./node_modules/vite-node/dist/client.mjs:381:16)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async ViteNodeRunner.cachedRequest (./node_modules/vite-node/dist/client.mjs:206:14)
at async ViteNodeRunner.dependencyRequest (./node_modules/vite-node/dist/client.mjs:259:12)
at async ./node_modules/@headlessui/vue/dist/headlessui.esm.js:11:32
at async ViteNodeRunner.runModule (./node_modules/vite-node/dist/client.mjs:399:5)
Any suggestion?5 Replies
Hi @artemis. 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 knowledge sources provided, there isn't specific information about this exact error in Nuxt 3.15. However, there are some relevant issues and suggestions that might help address your problem:
1. This error seems to be related to a recent upgrade, which is similar to issues reported in Github Issue #30057 (https://github.com/nuxt/nuxt/issues/30057) and Github Issue #30008 (https://github.com/nuxt/nuxt/issues/30008).
2. One user reported that reverting to Nuxt version 3.14.0 from 3.15.0 solved a similar error Github Issue #30008 (https://github.com/nuxt/nuxt/issues/30008).
3. Another user suggested that updating the
pinia
package resolved their issue after upgrading Github Issue #30057 (https://github.com/nuxt/nuxt/issues/30057).
4. It's also worth checking if you have any CommonJS require
statements in your project. A user reported fixing a similar error by replacing CommonJS imports with ESM imports Github Issue #29943 (https://github.com/nuxt/nuxt/issues/29943).
Given these suggestions, you could try the following:
1. Temporarily downgrade to Nuxt 3.14.0 to see if the error persists.
2. Update all your dependencies, especially pinia
if you're using it.
3. Check your project for any CommonJS require
statements and replace them with ESM imports.
4. If the error persists, try removing the node_modules
folder and your package lock file (package-lock.json or yarn.lock), then reinstall your dependencies.
If none of these solutions work, you might want to create a minimal reproduction of the issue and report it on the Nuxt GitHub repository (https://github.com/nuxt/nuxt/issues).
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------<@671184686097367042> Kapa.ai is still learning and improving, please let me know how I did by reacting below.
Could be related to https://discord.com/channels/473401852243869706/1321793852901818368
Try to override to Vite 5 on package.json, as a temporary measure.
"overrides": {
"vite": "5.4.11"
}
GitHub
Nuxt 3.15 "Unexpected token" · Issue #2971 · nuxt/ui
Environment Operating System: Darwin Node Version: v20.10.0 Nuxt Version: 3.15.0 CLI Version: 3.17.2 Nitro Version: 2.10.4 Package Manager: [email protected] Builder: - User Config: default Runtime Module...
Thank you very much