Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught SyntaxError when building Nuxt.js 3.11.2 with Webpack #26951

Open
konkarin opened this issue Apr 26, 2024 · 3 comments
Open

Uncaught SyntaxError when building Nuxt.js 3.11.2 with Webpack #26951

konkarin opened this issue Apr 26, 2024 · 3 comments

Comments

@konkarin
Copy link

Environment

  • Operating System: Linux
  • Node Version: v18.18.0
  • Nuxt Version: 3.11.2
  • CLI Version: 3.11.1
  • Nitro Version: 2.9.6
  • Package Manager: npm@10.2.3
  • Builder: webpack
  • User Config: devtools, builder
  • Runtime Modules: -
  • Build Modules: -

Reproduction

https://stackblitz.com/edit/github-x4yvog

Describe the bug

I encountered this issue when upgrading from nuxt 3.10.3 to 3.11.2 on my local environment. This error did not occur with 3.10.3.
As shown in the attached reproduction repository, the issue persists even when downgrading nuxt and @nuxt/webpack-builder to 3.10.3, so the problem may not be limited to just those packages.

I would really appreciate any help or insights you could provide on resolving this.

Additional context

No response

Logs

Uncaught SyntaxError: Invalid or unexpected token (at vendors-node_modules_webpack-hot-middleware_client_js_reload_true_timeout_30000_path_2F__webp-b4bdca.js:29:6)
Copy link

stackblitz bot commented Apr 26, 2024

Fix this issue in StackBlitz Codeflow Start a new pull request in StackBlitz Codeflow.

@wattanx
Copy link
Collaborator

wattanx commented Apr 29, 2024

I found that setting webpack-dev-middleware to 7.0.0 or lower is a workaround.

https://stackblitz.com/edit/github-x4yvog-bvn5jq

@konkarin
Copy link
Author

konkarin commented May 7, 2024

@wattanx
Thank you for providing the workaround. I really appreciate you taking the time.🥳

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants