ember.js - 在启动 ember 服务器时,我收到了类似 SyntaxError: Unexpected identifier async postBuild() 之类的错误
问题描述
启动 ember 服务器时出现此错误 此错误的原因可能是什么?
Unexpected identifier
/Users/chraju/Desktop/sites/blog-front-end/node_modules/ember-cli-typescript/js/addon.js:47
async postBuild() {
^^^^^^^^^
SyntaxError: Unexpected identifier
at createScript (vm.js:56:10)
at Object.runInThisContext (vm.js:97:10)
at Module._compile (module.js:549:28)
at Object.Module._extensions..js (module.js:586:10)
at Module.load (module.js:494:32)
at tryModuleLoad (module.js:453:12)
at Function.Module._load (module.js:445:3)
at Module.require (module.js:504:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/Users/chraju/Desktop/sites/blog-front-end/node_modules/ember-cli-typescript/index.js:9:20)
解决方案
更新节点
非虚拟机安装 8.11.1
使用更新版本
非虚拟机使用 8.11.1
在 package.json 更新 ember-cli 版本
“ember-cli”:“2.13.3”
删除节点模块并运行
rm -rf 节点模块
npm 安装
余烬
现在工作正常
推荐阅读
- c++ - C++ - 将元素按升序插入数组的段错误
- html - 如何从 HTML 标签中获取 imageURL
- python - 您好,python 3.8.1 的 dedent 空闲是否有问题
- ios - 如何阻止书签崩溃 PDF 应用程序?
- swiftui - SwiftUI 如何在 WKWebView 中添加活动指示器?
- php - 如何在 PHP 中显示数据库中的数据,其中每出现 4 个数据,然后将其他数据放在下面
- r - 如何计算两个数据框中日期范围内的平均值
- f# - F#:在函数声明中指定自定义类型(要配对的复数)
- r - 在 R (dplyr, r) 内分组、占用持续时间和设置条件
- android - 导航抽屉中的多种字体类型 - 导航组件