我已经使用此命令安装了Angular-CLI
npm install -g @angular/cli
Run Code Online (Sandbox Code Playgroud)
但我意识到它已安装Angular v5.1.3但我需要使用Angular 4.x.
如何在最新版本的Angular 4.x上安装最新版本的Angular-CLI?
所以我买了一台新电脑,我想通过 github 传递我的 angular 项目。我用了 1. npm i2. npm i @angular/cli@latest -D3.ng update
每次我尝试使用ng s它运行项目时,它都会向我发送此错误:
This version of CLI is only compatible with Angular versions ^9.0.0-beta || >=9.0.0 <10.0.0,
but Angular version 8.2.14 was found instead.
Please visit the link below to find instructions on how to update Angular.
https://angular-update-guide.firebaseapp.com/
Run Code Online (Sandbox Code Playgroud)
我尝试使用链接中的说明。
这是我输入时的 Angular 版本ng --version:
Angular CLI: 9.0.1
Node: 12.16.0
Run Code Online (Sandbox Code Playgroud)
这是 package.json:
{
"name": "empire-gaming",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng …Run Code Online (Sandbox Code Playgroud)