I think I have to delete anything node-related from my machine but wanted to check first..
I was trying to create a script with commander and ran npm install -g
at some point. All of a sudden, I started to get errors when I did any thing node.
For example, when I tried to install Bower, I got this message:
npm ERR! Error: Cannot find module './polyfills.js'
npm ERR! at Function.Module._resolveFilename (module.js:338:15)
npm ERR! at Function.Module._load (module.js:280:25)
npm ERR! at Module.require (module.js:364:17)
npm ERR! at require (module.js:380:17)
npm ERR! at Object.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/tar/node_modules/fstream/node_modules/graceful-fs/graceful-fs.js:8:1)
npm ERR! at Module._compile (module.js:456:26)
npm ERR! at Object.Module._extensions..js (module.js:474:10)
npm ERR! at Module.load (module.js:356:32)
npm ERR! at Function.Module._load (module.js:312:12)
npm ERR! at Module.require (module.js:364:17)
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR! <http://github.com/npm/npm/issues>
npm ERR! System Darwin 13.4.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "bower" "-g"
npm ERR! cwd /Users/gitteka/Sites/kaidez.com
npm ERR! node -v v0.10.36
npm ERR! npm -v 1.4.28
npm ERR! code MODULE_NOT_FOUND
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/gitteka/Sites/kaidez.com/npm-debug.log
npm ERR! not ok code 0
When I tried to run npm-check-updates
, bash couldn't find it.
I have a feeling my original node install is screwed up.
When I run which node
, it says /usr/local/bin/node
. But all my node modules are in /usr/local/lib/node_modules
...including Bower and npm-check-updates.
There are other errors so I think I have to rip everything out and reinstall it, but I just wanted to make sure.