admin管理员组文章数量:1033649
npm 提示:UnhandledPromiseRejectionWarning: SyntaxError: Unexpected token ‘??=’ 错误的
今天安装laravel/breeze
套件时,运行npm run dev
命令遇到报错,错误详细代码如下:
UnhandledPromiseRejectionWarning: SyntaxError: Unexpected token '??='
at Loader.moduleStrategy (internal/modules/esm/translators.js:145:18)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:8744) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see .html#cli_unhandled_rejections_mode). (rejection id: 1)
看了半天也不明白是啥意思,后来搜索了一下发现应该是nodejs
版本过低的问题,于是升级了一下nodejs
版本,从v14.17.6
升级到v20.12.1
。再次运行命令,成功执行,问题解决。
npm 提示:UnhandledPromiseRejectionWarning: SyntaxError: Unexpected token ‘??=’ 错误的
今天安装laravel/breeze
套件时,运行npm run dev
命令遇到报错,错误详细代码如下:
UnhandledPromiseRejectionWarning: SyntaxError: Unexpected token '??='
at Loader.moduleStrategy (internal/modules/esm/translators.js:145:18)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:8744) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see .html#cli_unhandled_rejections_mode). (rejection id: 1)
看了半天也不明白是啥意思,后来搜索了一下发现应该是nodejs
版本过低的问题,于是升级了一下nodejs
版本,从v14.17.6
升级到v20.12.1
。再次运行命令,成功执行,问题解决。
本文标签: npm 提示UnhandledPromiseRejectionWarning SyntaxError Unexpected token ’ 错误的
版权声明:本文标题:npm 提示:UnhandledPromiseRejectionWarning: SyntaxError: Unexpected token ‘??=’ 错误的 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/jiaocheng/1748073929a2249197.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论