英文:
Getting unexpected token error in vercel while deploying (runs fine in development)
问题
如何解决这个问题我不太确定,所以请帮忙,提前感谢。
英文:
How to resolve this I am not sure so please help, thank you in advance
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> (/vercel/path0/node_modules/next/dist/telemetry/post-payload.js:17:20)
at Module._compile (internal/modules/cjs/loader.js:1114:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1143:10)
Error: Command "npm run build" exited with 1
Deployment completed
BUILD_UTILS_SPAWN_1: Command "npm run build" exited with 1
答案1
得分: 1
Node.js 16.8 或更新版本。
https://nextjs.org/docs/getting-started/installation
你可以在系统要求中查看此信息。
英文:
You Node.js 16.8 or later.
https://nextjs.org/docs/getting-started/installation
You can see this in the System Requirement.
答案2
得分: 0
问题出在我降级了next.js的版本,现在它运行正常。
英文:
The problem was the version of next.js I downgraded it and it works fine now
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论