[nuxt] [request error] [unhandled] [500] Unexpected token ';'
at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:168:18)
at callTranslator (node:internal/modules/esm/loader:279:14)
at ModuleLoader.moduleProvider (node:internal/modules/esm/loader:285:30)
at async link (node:internal/modules/esm/module_job:78:21)
[nuxt] [request error] [unhandled] [500] Unexpected token ';'
at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:168:18)
at callTranslator (node:internal/modules/esm/loader:279:14)
at ModuleLoader.moduleProvider (node:internal/modules/esm/loader:285:30)
at async link (node:internal/modules/esm/module_job:78:21)
Additional information
While using Pinia with Nuxt, the production build throws an error: 'nuxt] [request error] [unhandled] [500] Unexpected token ';''.
Upon investigation, I found the error in .output/server/chunks/build/server.mjs.
However, I tried to fix the problem by downgrading packages using vite@5.31, nuxt/vite-builder@3.12.2, nuxt@3.12.2 and nuxt/kit@3.12.0. Unfortunately, I was unable to resolve the issue.
Reproduction
https://stackblitz.com/edit/github-tmvhj9?file=package.json
Steps to reproduce the bug
Go to the terminal and run
see the issue
refer => https://github.com/nuxt/nuxt/issues/28293
Expected behavior
The build preview should run without any errors.
Actual behavior
While running the build, I got an error
[nuxt] [request error] [unhandled] [500] Unexpected token ';' at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:168:18)
at callTranslator (node:internal/modules/esm/loader:279:14)
at ModuleLoader.moduleProvider (node:internal/modules/esm/loader:285:30)
at async link (node:internal/modules/esm/module_job:78:21) [nuxt] [request error] [unhandled] [500] Unexpected token ';' at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:168:18)
at callTranslator (node:internal/modules/esm/loader:279:14)
at ModuleLoader.moduleProvider (node:internal/modules/esm/loader:285:30)
at async link (node:internal/modules/esm/module_job:78:21)
Additional information
While using Pinia with Nuxt, the production build throws an error: 'nuxt] [request error] [unhandled] [500] Unexpected token ';''.
Upon investigation, I found the error in .output/server/chunks/build/server.mjs.
However, I tried to fix the problem by downgrading packages using vite@5.31, nuxt/vite-builder@3.12.2, nuxt@3.12.2 and nuxt/kit@3.12.0. Unfortunately, I was unable to resolve the issue.