Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

npm ERR! Cannot read property 'path' of null

**C:\Users\Abc>npm install -g

npm ERR! addLocal Could not install C:\Users\Abc

npm ERR! Windows_NT 6.1.7601

npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Users\Abc\AppData\Ro aming\npm\node_modules\npm\bin\npm-cli.js" "install" "-g"

npm ERR! node v7.2.1

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! C:\Users\Abc\npm-debug.log**

i have reinstall node with version 7.2.1 after every time this occurs when i download any package

need suggestion related to null path error

like image 834
Pradip Avatar asked Jan 26 '26 17:01

Pradip


2 Answers

I ran into this issue while installing gulp My NPM and Node Versions are:

  • node v7.7.4
  • npm v4.1.2

In npm version 4x, https client certificates were made required rather than optional. Details are in their github area. Long story short, what helped for me was running the following command:

 npm config set strict-ssl false

Once this was done, running the command

npm install gulp -g

Worked like a charm for me!

like image 178
Jersey_Guy Avatar answered Jan 28 '26 09:01

Jersey_Guy


If you are working behind proxy, you need to set proxy for nodejs

npm config set proxy http://proxy_host:port 
npm config set https-proxy http://proxy_host:port

Hope it Helps.. :)

like image 26
Sarat Chandra Avatar answered Jan 28 '26 09:01

Sarat Chandra



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!