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 ReactJS_BluePrints_Scaffo[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
我--save也试过,同样的问题。我现在用--save更新了我的帖子。请让我知道在这个命令中是否有我在这里失踪的东西。我试过只用'npm install --save watchify @ 3.6.1',再次出现同样的问题 – user3181365
在'npm install --save watchify @ 3.6.1'中'save'之前,你的第一个字符是一个连字符,比应该使用的连字符。试试'npm install --save watchify @ 3.6.1' – SLePort
哇,好抓。非常感谢。但为什么错误信息完全不同,错误是否说我的命令有任何错误?只是好奇地问这个。 – user3181365