【发布时间】:2022-01-18 02:51:15
【问题描述】:
【问题讨论】:
-
欢迎来到 Stack Overflow。 Please don't post screenshots of text。它们无法被屏幕阅读器等自适应技术的用户搜索或复制,甚至无法使用。相反,将代码作为文本直接粘贴到您的问题中。如果选择它并单击
{}按钮或Ctrl+K,则代码块将缩进四个空格,这将导致其呈现为代码。
【问题讨论】:
{} 按钮或Ctrl+K,则代码块将缩进四个空格,这将导致其呈现为代码。
我改了两次
这是一个语法错误。令牌的值无关紧要:您使用的 Node.js 版本不理解the nullish assignment operator, ??=。
看起来对 ??= 的支持已添加到 Node.js somewhere during the v15 development cycle。从 Heroku supports even-numbered (long-term support) 版本开始,您需要使用 Node.js 版本 16。
你可以specify the version of Node.js you wish to use via your package.json,例如
{
"name": "Some Application",
"description": "An application that does cool stuff",
"version": "1.0.0",
"engines": {
"node": "16.x"
}
}
在您的package.json 中更新(或设置)node 版本,提交并重新部署。
【讨论】: