0
votes

I'm trying to get a mongo database running with nodejs but when I type 'npm install mongodb' into my command line, I am getting the following error:


    C:\Users\me>npm install mongodb
    npm http GET https://registry.npmjs.org/mongodb
    npm http 304 https://registry.npmjs.org/mongodb
    npm http GET https://registry.npmjs.org/bson/0.1.3
    npm http 304 https://registry.npmjs.org/bson/0.1.3
    npm WARN package.json [email protected] No README.md file found!

    > [email protected] install C:\Users\me\node_modules\mongodb\node_modules\bson
    > node install.js

    CreateProcessW: The system cannot find the file specified.
    npm ERR! [email protected] install: `node install.js`
    npm ERR! `cmd "/c" "node install.js"` failed with 127
    npm ERR!
    npm ERR! Failed at the [email protected] install script.
    npm ERR! This is most likely a problem with the bson 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 bson
    npm ERR! There is likely additional logging output above.

    npm ERR! System Windows_NT 6.1.7601
    npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_m
    odules\\npm\\bin\\npm-cli.js" "install" "mongodb"
    npm ERR! cwd C:\Users\me
    npm ERR! node -v v0.8.9
    npm ERR! npm -v 1.1.61
    npm ERR! code ELIFECYCLE
    npm ERR!
    npm ERR! Additional logging details can be found in:
    npm ERR!     C:\Users\me\npm-debug.log
    npm ERR! not ok code 0

    C:\Users\me>

 

It seems that bson0.1.3 is the issue. Does anyone know I might go about resolving this? I am using 64bit Windows 7, nodejs version 0.8.9, npm version 1.1.61 and have mongodb version 2.2.0 currently installed.

2

2 Answers

2
votes

Administrator permission of your cmd is required for npm to invoke CreateProcessW.

0
votes

I've tried today and it worked fine for me the exact version of node and npm. Is there any info you can find in the npm-debug.log file?

Though note there is Issue created in the GitHub repository:
https://github.com/mongodb/js-bson/issues/14