当前位置: 移动技术网 > IT编程>开发语言>JavaScript > npm ERR! Cannot read property 'path' of null

npm ERR! Cannot read property 'path' of null

2018年08月31日  | 移动技术网IT编程  | 我要评论
npm ERR! Cannot read property 'path' of null ...

npm错误:

错误信息如下:

$ sudo npm install -g bean-sdk
sudo: npm: command not found
$ npm install -g bean-sdk
npm err! linux 3.13.0-39-generic
npm err! argv "/usr/local/bin/node" "/usr/local/bin/bin/npm" "install" "-g" "bean-sdk"
npm err! node v4.4.5
npm err! npm  v4.0.5

npm err! cannot read property 'path' of null
npm err! 
npm err! if you need help, you may report this error at:
npm err!     <https://github.com/npm/npm/issues>

npm err! please include the following file with any support request:
npm err!     /home/jadeye/npm-debug.log


npm-debug.log
https://gist.github.com/jadeye/10f79dbb72a57eef9aef304794bbb94c

### supporting information:

 - `npm -v` prints: 4.0.5
 - `node -v` prints: v4.4.5
 - `npm config get registry` prints: https://registry.npmjs.org/
 - windows, os x/macos, or linux?: linux

解决方式如下:

registry is empty when i checked using "npm config get" command. i tried npm config set registry=http://registry.npmjs.org/ and it worked for me.

node: 6.3.1
npm: 4.2.0

原文链接地址:

如您对本文有疑问或者有任何想说的,请 点击进行留言回复,万千网友为您解惑!

相关文章:

验证码:
移动技术网