kur*_*mez 4 npm angular angular7
我使用Angular 7.1.4。我想用下面的代码生成一个新模块;
ng g m order-process
但是我遇到了一个错误:
Invalid rule result: Instance of class Promise.
Run Code Online (Sandbox Code Playgroud)
如何解决这个问题?节点:8.11.3
kur*_*mez 13
我解决了我的问题。我的angular / cli版本是7.0.7,但是在package-lock.json中找到了@ schematics / angular @ 8.0.3。因此,我运行了“ npm install @ schematics / angular @ 7.0.7 --save-dev”命令并解决了我的问题。感谢您的关注。
我的问题是我的节点版本已打开8.x.x但 angular >=8.x.x需要节点版本 >=10.x.x
我使用nvm更改节点版本。像这样安装它(检查 Windows 使用链接)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.2/install.sh | bash
Run Code Online (Sandbox Code Playgroud)
安装后安装节点版本 10.xx
nvm install 10
Run Code Online (Sandbox Code Playgroud)
然后像这样切换终端
nvm use 10
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
7126 次 |
| 最近记录: |