2017-09-05 14 views
1

角度が新しく、角度2に必要なnpmをインストールしようとしています.cliでエラーが発生しました。Angular2 NPMインストールエラー

npm ERR! 404 'types' is not in the npm registry. 
npm ERR! 404 You should bug the author to publish it 
npm ERR! 404 
npm ERR! 404 Note that you can also install from a 
npm ERR! 404 tarball, folder, or http url, or git url. 

npm ERR! System Linux 3.16.0-30-generic 
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" 
npm ERR! cwd /var/www/html/angularDemo 
npm ERR! node -v v0.10.25 
npm ERR! npm -v 1.3.10 
npm ERR! code E404 

npm ERR! TypeError: Cannot read property 'latest' of undefined 
npm ERR!  at next (/usr/share/npm/lib/cache.js:687:35) 
npm ERR!  at /usr/share/npm/lib/cache.js:675:5 
npm ERR!  at saved (/usr/share/npm/node_modules/npm-registry-client/lib/get.js:142:7) 
npm ERR!  at /usr/lib/nodejs/graceful-fs/polyfills.js:133:7 
npm ERR!  at Object.oncomplete (fs.js:107:15) 
npm ERR! If you need help, you may report this log at: 
npm ERR!  <http://github.com/isaacs/npm/issues> 
npm ERR! or email it to: 
npm ERR!  <[email protected]> 

npm ERR! System Linux 3.16.0-30-generic 
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" 
npm ERR! cwd /var/www/html/angularDemo 
npm ERR! node -v v0.10.25 
npm ERR! npm -v 1.3.10 
npm ERR! type non_object_property_load 
npm http 404 https://registry.npmjs.org/angular/router 
npm ERR! TypeError: Cannot read property 'latest' of undefined 
npm ERR!  at next (/usr/share/npm/lib/cache.js:687:35) 
npm ERR!  at /usr/share/npm/lib/cache.js:675:5 
npm ERR!  at saved (/usr/share/npm/node_modules/npm-registry-client/lib/get.js:142:7) 
npm ERR!  at /usr/lib/nodejs/graceful-fs/polyfills.js:133:7 
npm ERR!  at Object.oncomplete (fs.js:107:15) 
npm ERR! If you need help, you may report this log at: 
npm ERR!  <http://github.com/isaacs/npm/issues> 
npm ERR! or email it to: 
npm ERR!  <[email protected]> 

インストール中に私が行っている間違いを誰にでも教えてください。あなたは、端末を使用してcloneコマンドで作成したフォルダquickstartにレポ 移動のクローンを作成する場合

インストールが

git clone https://github.com/angular/quickstart.git quickstart 
cd quickstart 
npm install 
npm start 
+0

'package.json'コードを投稿してください。 –

答えて

0
git clone https://github.com/angular/quickstart.git quickstart 
cd quickstart 
npm install 
npm start 

コマンド。
端末で、npm installと入力します。
インストール後、npm startと入力すると、アプリが実行されます。

+0

私は彼も同じことをやっていると思う!あなたの答えは何が違うのですか? –

1

あなたのnpm registryがうんざりしているようです。

npm ERR! 404 'types' is not in the npm registry.

npm get registryを実行し、設定されているものを、レジストリを参照。あなたのクラスパスにある.npmrcファイルにもその情報が表示されます。

npm set registry https://registry.npmjs.org/で公開npmレジストリを指すか、.npmrcファイルを編集します。

関連する問題