MacBookマシンに@ angular/cliをインストールしました。ノードサーバーのバージョンはv6.9.5、npmのバージョンは3.10.10です。私は@ angular/cliをインストールするために以下のコマンドを実行しました。@ angular/cliはインストール後に動作しません
sudo npm install -g @angular-cli
ng helpコマンドまたはngコマンドを実行すると、それは私に次のエラーが表示さ
Parsing .angular-cli.json failed. Please make sure your .angular-cli.json is valid JSON. Error: SyntaxError: Unexpected token u in JSON at position 22
InvalidConfigError: Parsing .angular-cli.json failed. Please make sure your
.angular-cli.json is valid JSON.
Error: SyntaxError: Unexpected token u in JSON at position 22
at InvalidConfigError (/usr/local/lib/node_modules/@angular/cli/models/config/config.js:10:9)
at Function.fromConfigPath (/usr/local/lib/node_modules/@angular/cli/models/config/config.js:77:19)
at Function.fromProject (/usr/local/lib/node_modules/@angular/cli/models/config.js:96:46)
at Object.<anonymous> (/usr/local/lib/node_modules/@angular/cli/commands/build.js:7:35)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
私もアンインストールして、@のangualr/CLI、その後angualr/CLI @再インストールキャッシュをクリアします。私は次のコマンドを実行します。
sudo npm uninstall -g @angular-cli
npm cache clean sudo
npm install -g @angular-cli
なお同じ問題が発生しています。
@ angular-cliは現在値下げです。@ angle/cli @ latest' –
をインストールしてみてください。私は@ angular/cliパッケージをインストールしました。その前に、前のパッケージをアンインストールしてキャッシュをクリアしました。同じエラーメッセージが表示されます。 –