Showing posts with label npm install. Show all posts
Showing posts with label npm install. Show all posts

Tuesday, July 25, 2017

Cannot read property 'localeCompare' of undefined

While running npm install, I ran into following error -

npm WARN engine webpack@2.7.0: wanted: {"node":">=4.3.0 =5.10"} (current: {"node":"5.0.0","npm":"3.3.6"})
npm ERR! Darwin 16.6.0
npm ERR! argv "/Users/J/.nvm/versions/node/v5.0.0/bin/node" "/Users/J/.nvm/versions/node/v5.0.0/bin/npm" "install"
npm ERR! node v5.0.0
npm ERR! npm v3.3.6

npm ERR! Cannot read property 'localeCompare' of undefined
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!
npm ERR! Please include the following file with any support request:
npm ERR! /Users/Jaimin/Apps/redesign/data-exploration/npm-debug.log

mostly you will run into this issue if you are running npm 3.3.5 or 3.3.6.

You can try resolve it by below two ways,

1. Remove all node_modules folder, and try to run 'npm install' again.

If above doesn't resolve it, try below -

2. upgrade npm to 3.3.7 (or any subsequent one)
npm install npm@3.3.7 -g

It should resolve the issue. If you want to read up various other suggestions/reasoning checkout here