欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

npm ERR! Cannot read property 'path' of null

程序员文章站 2022-06-05 21:34:20
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

原文链接地址: