2016-10-29 53 views
0

npm installを使用していくつかの依存関係をインストールしようとしていますが、問題が発生しています。私はnpmを初めて使うので、何が問題なのか理解できません。TypeError:未定義のプロパティ 'latest'を読み取ることができません

以下は私のコマンドとその結果です。

npm install –- save [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]

npm WARN package.json [email protected] No repository field. 
npm http GET https://registry.npmjs.org/babelify/7.2.0 
npm http GET https://registry.npmjs.org/browserify-middleware/7.0.0 
npm http GET https://registry.npmjs.org/express/4.13.3 
npm http GET https://registry.npmjs.org/react/0.14.3 
npm http GET https://registry.npmjs.org/reactify/1.1.1 
npm http GET https://registry.npmjs.org/browser-sync/2.10.0 
npm http GET https://registry.npmjs.org/babel-preset-react/6.3.13 
npm http GET https://registry.npmjs.org/babel-preset-es2015/6.3.13 
npm http GET https://registry.npmjs.org/browserify/12.0.1 
npm http GET https://registry.npmjs.org/react-dom/0.14.3 
npm http GET https://registry.npmjs.org/watchify/3.6.1 
npm http GET https://registry.npmjs.org/%E2%80%93-save 
npm http 304 https://registry.npmjs.org/react/0.14.3 
npm http 304 https://registry.npmjs.org/express/4.13.3 
npm http 304 https://registry.npmjs.org/browserify-middleware/7.0.0 
npm http 304 https://registry.npmjs.org/babelify/7.2.0 
npm http 304 https://registry.npmjs.org/reactify/1.1.1 
npm http 304 https://registry.npmjs.org/browser-sync/2.10.0 
npm http 304 https://registry.npmjs.org/babel-preset-react/6.3.13 
npm http 304 https://registry.npmjs.org/babel-preset-es2015/6.3.13 
npm http 304 https://registry.npmjs.org/browserify/12.0.1 
npm http 304 https://registry.npmjs.org/react-dom/0.14.3 
npm http 304 https://registry.npmjs.org/watchify/3.6.1 
npm http 404 https://registry.npmjs.org/%E2%80%93-save 
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 4.2.0-27-generic 
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "–-save" "[email protected]" "[email protected]" "[email protected]" "[email protected]" "[email protected]" "[email protected]" "[email protected]" "[email protected]" "[email protected]" "[email protected]" "[email protected]" 
npm ERR! cwd /home/user/reactapp 
npm ERR! node -v v0.10.25 
npm ERR! npm -v 1.3.10 
npm ERR! type non_object_property_load 
npm ERR! 
npm ERR! Additional logging details can be found in: 
npm ERR!  /home/user/reactapp/npm-debug.log 
npm ERR! not ok code 0 

答えて

1

保存フラグが--save、ない–- saveでなければなりません。フラグの形式が誤っているため、は–-というパッケージを検索します(最後の編集以降は–-save)。

これを試してみてください:

npm install --save [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]1 
+0

は、私は、また--saveと同じ問題を試してみました。今、私の投稿を--saveで更新しました。このコマンドで私がここに欠けているものがあれば教えてください。私はちょうど 'npm install --save watchify @ 3.6.1'でもう一度同じ問題を試しました。 – user3181365

+1

' npm install --save watchify @ 3.6.1'に 'save'の前に、最初の文字はenダッシュです。使用すべきハイフン。 'npm install --save watchify @ 3.6.1'を試してください。 – SLePort

+0

WOW、良いキャッチです。どうもありがとう。しかし、なぜエラーメッセージが完全に異なっているのか、エラーが私のコマンドに関する何かが間違っていると言いますか?好奇心でこれを尋ねる。 – user3181365

関連する問題