Installing NPM with Node.js error “Cannot read property of undefined”

By July 31, 2016 Web No Comments
npm-run-feature

Recently, I was playing with Node.js 6. After downloading the install, I tried node -v which works fine but npm -v returned an error.

I was able to fix the issue by manually installing NPM using the line below in bash shell (If you don’t have babun or Git Bash, install just curl)

curl https://raw.githubusercontent.com/npm/npm/master/scripts/install.sh | sh

Hope that helps.

Leave a Reply