OpenMCT的“npm install”给出了很多错误

我正在阅读NASA的OpenMCT任务控制框架教程 ,并尝试在我的Macbook (OS X El Capitan)上安装。 我已经安装了node.js v4.5.0 LTS 。 npm版本是2.15.9。 每次我尝试npm install ,都会显示以下错误和警告。

 npm WARN engine karma-cli@0.0.4: wanted: {"node":"~0.8 || ~0.10"} (current: {"node":"4.5.0","npm":"2.15.9"}) npm WARN deprecated lodash@2.2.1: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^4.0.0. npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue npm ERR! fetch failed https://registry.npmjs.org/jscs/-/jscs-2.11.0.tgz npm WARN retry will retry, error on last attempt: Error: fetch failed with status code 400 > phantomjs-prebuilt@2.1.12 install /Users/Dhrubo/git/openmct/node_modules/phantomjs-prebuilt > node install.js module.js:327 throw err; ^ Error: Cannot find module './internal/applyEach' at Function.Module._resolveFilename (module.js:325:15) at Function.Module._load (module.js:276:25) at Module.require (module.js:353:17) at require (internal/module.js:12:17) at Object.<anonymous> (/Users/Dhrubo/git/openmct/node_modules/request/node_modules/form-data/node_modules/async/applyEach.js:7:18) at Module._compile (module.js:409:26) at Object.Module._extensions..js (module.js:416:10) at Module.load (module.js:343:32) at Function.Module._load (module.js:300:12) at Module.require (module.js:353:17) at require (internal/module.js:12:17) npm WARN deprecated lodash@1.0.2: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^4.0.0. npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue npm WARN deprecated graceful-fs@1.2.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree. npm WARN deprecated wrench@1.5.9: wrench.js is deprecated! You should check out fs-extra (https://github.com/jprichardson/node-fs-extra) for any operations you were using wrench for. Thanks for all the usage over the years. \ > node-sass@3.8.0 install /Users/Dhrubo/git/openmct/node_modules/gulp-sass/node_modules/node-sass > node scripts/install.js Binary downloaded and installed at /Users/Dhrubo/git/openmct/node_modules/gulp-sass/node_modules/node-sass/vendor/darwin-x64-46/binding.node > fsevents@1.0.14 install /Users/Dhrubo/git/openmct/node_modules/karma/node_modules/chokidar/node_modules/fsevents > node-pre-gyp install --fallback-to-build [fsevents] Success: "/Users/Dhrubo/git/openmct/node_modules/karma/node_modules/chokidar/node_modules/fsevents/lib/binding/Release/node-v46-darwin-x64/fse.node" already installed Pass --update-binary to reinstall or --build-from-source to recompile > node-sass@3.8.0 postinstall /Users/Dhrubo/git/openmct/node_modules/gulp-sass/node_modules/node-sass > node scripts/build.js "/Users/Dhrubo/git/openmct/node_modules/gulp-sass/node_modules/node-sass/vendor/darwin-x64-46/binding.node" exists. testing binary. Binary is fine; exiting. npm ERR! Darwin 15.2.0 npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" npm ERR! node v4.5.0 npm ERR! npm v2.15.9 npm ERR! code ELIFECYCLE npm ERR! phantomjs-prebuilt@2.1.12 install: `node install.js` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the phantomjs-prebuilt@2.1.12 install script 'node install.js'. npm ERR! This is most likely a problem with the phantomjs-prebuilt 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 information on how to open an issue for this project with: npm ERR! npm bugs phantomjs-prebuilt npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm ERR! npm owner ls phantomjs-prebuilt npm ERR! There is likely additional logging output above. npm ERR! Please include the following file with any support request: npm ERR! /Users/Dhrubo/git/openmct/npm-debug.log 

更新minimatch解决了这个问题。 运行以下命令。

 npm update minimatch 

然后运行npm install