Trouble getting Mongo DB to set up using npm on windows 7... any ideas?


I'm having trouble getting mongodb and mongoose to install with npm. Any advice would be much appreciated! I saw an earlier post where they said to clear the cache and update - this has been done but still the same problem... below is the error for mongo db install but it's almost exactly the same for mongoose

various get from server logs...

> mongodb@0.9.9-2 install C:\Users\petrov\Desktop\nodejs\node_modules\mongodb
> node install.js

'node' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! error installing mongodb@0.9.9-2

npm ERR! mongodb@0.9.9-2 install: `node install.js`
npm ERR! `cmd "/c" "node install.js"` failed with 1
npm ERR!
npm ERR! Failed at the mongodb@0.9.9-2 install script.
npm ERR! This is most likely a problem with the mongodb package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node install.js
npm ERR! You can get their info via:
npm ERR!     npm owner ls mongodb
npm ERR! There is likely additional logging output above.
npm ERR!
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Users\\petrov\\Desktop\\nodejs\\\\node.exe" 
"C:\\Users\\petrov\\Desktop\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "mongodb"
npm ERR! cwd C:\Users\petrov\Desktop\nodejs
npm ERR! node -v v0.6.10
npm ERR! npm -v 1.1.0-3
npm ERR! message mongodb@0.9.9-2 install: `node install.js`
npm ERR! message `cmd "/c" "node install.js"` failed with 1
npm ERR! errno {}
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     C:\Users\petrov\Desktop\nodejs\npm-debug.log
npm not ok
Problem courtesy of: Petrov


Check the path where node is installed or run the command from the same directory where you installed the node.

Solution courtesy of: Brain


For those that are still running into this issue, I solved it by adding the nodejs installation path (C:\Program Files (x86)\nodejs\ for me) to my local PATH environment variable.

Discussion courtesy of: Kevin

try npm -dd install mongodb

it might work for you. there seems to be a bug in npm

Discussion courtesy of: christkv

This recipe can be found in it's original form on Stack Over Flow.