【发布时间】:2015-07-28 08:11:04
【问题描述】:
我正在尝试使用“npm install mongodb”在 Windows 8 机器上为节点 js express 安装 MongoDB C:\Users\lisp\Desktop\CRUD>npm install mongodb /
kerberos@0.0.11 安装 C:\Users\lisp\Desktop\CRUD\node_modules\mongodb\node_modules\mongodb-core\node_modules\kerberos (node-gyp 重建 2> builderror.log) || (0号出口)
C:\Users\lisp\Desktop\CRUD\node_modules\mongodb\node_modules\mongodbcor\node_modules\kerberos>if not defined npm_config_node_gyp (node "C:\ProgramFiles\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_module\node-gyp\bin\node-gyp.js" rebuild ) else (rebuild)
npm WARN installMany nopt was bundled with node-pre-gyp@0.6.4, but bundled packa ge wasn't found in unpacked tree
npm WARN installMany npmlog was bundled with node-pre-gyp@0.6.4, but bundled package wasn't found in unpacked tree
npm WARN installMany request was bundled with node-pre-gyp@0.6.4, but bundled package wasn't found in unpacked tree
npm WARN installMany semver was bundled with node-pre-gyp@0.6.4, but bundled package wasn't found in unpacked tree
npm WARN installMany tar was bundled with node-pre-gyp@0.6.4, but bundled package wasn't found in unpacked tree
npm WARN installMany tar-pack was bundled with node-pre-gyp@0.6.4, but bundled package wasn't found in unpacked tree
npm WARN installMany mkdirp was bundled with node-pre-gyp@0.6.4, but bundled package wasn't found in unpacked tree
npm WARN installMany rc was bundled with node-pre-gyp@0.6.4, but bundled package wasn't found in unpacked tree
npm WARN installMany rimraf was bundled with node-pre-gyp@0.6.4, but bundled package wasn't found in unpacked tree
/
> bson-ext@0.1.7 install C:\Users\lisp\Desktop\CRUD\node_modules\mongod\node_modules\mongodb-core\node_modules\bson\node_modules\bson-ext> (node-pre-gyp install --fallback-to-build) || (node-gyp rebuild 2> builderror.log) || (exit 0)
C:\Users\lisp\Desktop\CRUD\node_modules\mongodb\node_modules\mongodb-core\node_modules\bson\node_modules\bson-ext>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" clean ) else (clean)
C:\Users\lisp\Desktop\CRUD\node_modules\mongodb\node_modules\mongodb-core\node_modules\bson\node_modules\bson-ext>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" configure --fallback-to-build --module=C:\Users\lisp\Desktop\CRUD\node_modules\mongodb node_modules\mongodb-core\node_modules\bson\node_modules\bson-ext\build\Release\bson.node --module_name=bson --module_path=C:\Users\lisp\Desktop\CRUD\node_modules\mongodb\node_modules\mongodb-core\node_modules\bson\node_modules\bson-ext\build\Release ) else (configure --fallback-to-build --module=C:\Users\lisp\Desktop\CRUD\node_modules\mongodb node_modules\mongodb-core\node_modules\bson\node_modules\bson-ext\build\Release\bson.node --module_name=bson --module_path=C:\Users\lisp\Desktop\CRUD\node_modules\mongodb\node_modules\mongodb-core\node_modules\bson\node_modules\bson-ext\build\Release )
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYT HON env variable.
gyp ERR! stack at failNoPython (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:103:14)
gyp ERR! stack at C:\Program Files\nodejs\node_modules npm\node_modules\node-gyp\lib\configure.js:64:11
gyp ERR! stack at FSReqWrap.oncomplete (evalmachine.anonymous>:95:15)
gyp ERR! System Windows_NT 6.2.9200
gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--module=C:\\Users\\lisp\\Desktop\\CRUD\\node_modules\\mongodb\\node_modules\\mongodb-core\\node_modules\\bson\\node_modules\\bson-ext\\build\\Release\\bson.node" "--module_name=bson" "--module_path=C:\\Users\\lisp\\Desktop\\CRUD\\node_modules\\mongodb\\node_modules\\mongodb-core\\node_modules\\bson\\node_modules\\bson-ext\\build\\Release"
gyp ERR! cwd C:\Users\lisp\Desktop\CRUD\node_modules\mongodb\node_modules\mongodb-core\node_modules\bson\node_modules\bson-ext
gyp ERR! node -v v0.12.2
gyp ERR! node-gyp -v v1.0.3
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'node-gyp.cmd configure --fallb
ack-to-build --module=C:\Users\lisp\Desktop\CRUD\node_modules\mongodb\node_modul
es\mongodb-core\node_modules\bson\node_modules\bson-ext\build\Release\bson.node
--module_name=bson --module_path=C:\Users\lisp\Desktop\CRUD\node_modules\mongodb\node_modules\mongodb-core\node_modules\bson\node_modules\bson-ext\build\Release
' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (C:\Users\lisp\Desktop\CRUD\node_modules\mongodb\node_modules\mongodb-core\node_modules\bson\node_modules\bson-ext\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:110:17)
node-pre-gyp ERR! stack at maybeClose (child_process.js:1015:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1087:5)
node-pre-gyp ERR! System Windows_NT 6.2.9200
node-pre-gyp ERR! command "node" "C:\\Users\\lisp\\Desktop\\CRUD\\node_modules\\
mongodb\\node_modules\\mongodb-core\\node_modules\\bson\\node_modules\\bson-ext\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp.js" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd C:\Users\lisp\Desktop\CRUD\node_modules\mongodb\node_modules\mongodb-core\node_modules\bson\node_modules\bson-ext
node-pre-gyp ERR! node -v v0.12.2
node-pre-gyp ERR! node-pre-gyp -v v0.6.4
node-pre-gyp ERR! not ok
Failed to execute 'node-gyp.cmd configure --fallback-to-build
--module=C:\Users\lisp\Desktop\CRUD\node_modules\mongodb\node_modules\mongodb-core\node_modules\bson\node_modules\bson-ext\build\Release\bson.node --module_name=bson --module_path=C:\Users\lisp\Desktop\CRUD\node_modules\mongodb\node_modules\mongodb-core\node_modules\bson\node_modules\bson-ext\build\Release' (1)
C:\Users\lisp\Desktop\CRUD\node_modules\mongodb\node_modules\mongodb-core\node_modules\bson\node_modules\bson-ext>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (rebuild)
npm ERR! Windows_NT 6.2.9200
npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "mongodb"
npm ERR! node v0.12.2
npm ERR! npm v2.7.4
npm ERR! code EPEERINVALID
npm ERR! peerinvalid The package mongodb does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer mongoskin@1.4.13 wants mongodb@~1.4
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\lisp\Desktop\CRUD\npm-debug.log
提前谢谢.....:)
【问题讨论】: