在部署时在Vercel中遇到意外的令牌错误(在开发中正常运行)。

huangapple go评论80阅读模式
英文:

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

huangapple
  • 本文由 发表于 2023年5月11日 16:11:01
  • 转载请务必保留本文链接:https://go.coder-hub.com/76225430.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定