我安装了Angular-CLI,但它显示错误.当我创建一个新项目时__CODE__,我收到此错误:
ng n app
Run Code Online (Sandbox Code Playgroud)
所以我想卸载Angular-CLI.
我正在尝试将角度更新为最新版本.
我更新了global @ angular/cli
npm install -g @angular/cli
Run Code Online (Sandbox Code Playgroud)
然后,当我尝试更新local @ angular/cli时,ng update @angular/cli我收到此错误:
Error: Unexpected end of JSON input
Unexpected end of JSON input
Run Code Online (Sandbox Code Playgroud)
这是我的package.json
{
"name": "apimap",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/animations": "^5.2.11",
"@angular/cdk": "^5.2.5",
"@angular/common": "^5.2.11",
"@angular/compiler": "^5.2.11",
"@angular/core": "^5.2.11",
"@angular/flex-layout": "^2.0.0-rc.1",
"@angular/forms": "^5.2.11",
"@angular/http": "^5.2.11",
"@angular/material": "^5.2.5",
"@angular/platform-browser": "^5.2.11",
"@angular/platform-browser-dynamic": "^5.2.11", …Run Code Online (Sandbox Code Playgroud) 我已经阅读了一些关于如何将 Angular CLI 从 7 升级到 8 的教程和SO。这应该是一件简单的事情。无论我在跑步时做什么,我都会ng version得到 7.2.2。
我试过运行卸载,安装,升级,使用 sudo,指定ng update @angular/cli@^8, @latest。无论我得到相同的结果。我也没有收到任何错误。
我使用的是 Mac 10.14.6 (Mojave)
如何对 Angular CLI 8 进行简单升级?
我正在尝试将我的 Angular CLI 全球版本更新到最新版本。
为什么ng v安装后还是不显示1.3.2版本?
我正在使用nvm顺便说一句。
安装前...
$ng -v
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ ? \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| …Run Code Online (Sandbox Code Playgroud)