2017-03-20 12 views
1

角度CLIをグローバルにインストールしようとしましたが、すぐにこのエラーが発生しました。angular CLIのインストールに失敗しました

npm version is 4.1.2 and the node version is 7.7.3. 
npm ERR! Linux 4.4.0-66-generic 
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start" 
npm ERR! node v7.7.3 
npm ERR! npm v4.1.2 
npm ERR! path /home/edu/package.json 
npm ERR! code ENOENT 
npm ERR! errno -2 
npm ERR! syscall open 
npm ERR! enoent ENOENT: no such file or directory, open '/home/edu/package.json' 
npm ERR! enoent ENOENT: no such file or directory, open '/home/edu/package.json' 
npm ERR! enoent This is most likely not a problem with npm itself 
npm ERR! enoent and is related to npm not being able to find a file. 
npm ERR! enoent 
npm ERR! Please include the following file with any support request: 
npm ERR!  /home/edu/npm-debug.log 
+0

インストールするために入力したコマンドはどれですか? – echonax

+0

npm install -g @ angular/cli。このコードを試すことができませんでした。新しいcliにはバリエーションがあります。しかし、私は新しいプロジェクトフォルダを作成し、それを最初から初期化したとき、コードは何の問題もなく実行されました。 – Edu

+0

申し訳ありませんが、あなた自身の質問に答えて答えとしてマークすることができます。 – echonax

答えて

2

初期化されていないnpmパッケージディレクトリにnpm installのようです。

npm initでパッケージを初期化する必要があります。 パッケージを初期化せずにデバッグを使用する場合は、npm install debug

これは私の推奨ではクリーンインストールを行っている場合に修正する可能性があります。 (または、グローバルパッケージの場合は、npm -g uninstall <package> ; npm -g install <package>を実行してください)。

関連する問題