You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Version 1.6.6 resulted in Unexpected token '{' error on Nuxt project #136
This update messed with something and I started receiving this error stack when opening my Nuxt project:
SyntaxError: Unexpected token '{'
at wrapSafe (internal/modules/cjs/loader.js:1029:16)
at Module._compile (internal/modules/cjs/loader.js:1078:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1143:10)
at Module.load (internal/modules/cjs/loader.js:979:32)
at Function.Module._load (internal/modules/cjs/loader.js:819:12)
at Module.require (internal/modules/cjs/loader.js:1003:19)
at require (internal/modules/cjs/helpers.js:107:18)
at Object.<anonymous> (node_modules/node-fetch-native/dist/index.cjs:1:80)
at Module._compile (internal/modules/cjs/loader.js:1114:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1143:10)
Facing the same issue. A breaking change shouldn't be published under a minor version bump. Probably author didn't expect this to be a breaking change. But it is for legacy projects
Activity
imzedi commentedon Jan 23, 2025
Facing the same issue on exact environment
pi0 commentedon Jan 24, 2025
Can you please share a reproduction?
Nuxt 2 is EOL, it might be an old bundler support issue.
LeoonLiang commentedon Feb 13, 2025
Facing the same issue on exact environment
OrkhanAlikhanov commentedon May 20, 2025
Facing the same issue. A breaking change shouldn't be published under a minor version bump. Probably author didn't expect this to be a breaking change. But it is for legacy projects
lumirelle commentedon Aug 2, 2025
I found out that this issue is caused by
/dist/node.cjs.In version 1.6.6,
/dist/node.cjscontains static block syntax, which Node 14 does not support:And in version 1.6.4, this file does not use the static block syntax.
Maybe this issue is caused by the changed behavior of unbuild or esbuild?
pi0 commentedon Aug 2, 2025
1.6.7 released with lowered
ES2020target (thanks @lumirelle for #145)Can someone please confirm if it fixes issues?