2017-06-26 200 views
0

我的CI工具使用节点版本4.8.3。所以我不得不将我的本地node.js从6回滚到4.8.3。现在当我做npm install -g我看到以下错误。无法安装node.js模块

我没有面对错误,当我使用6x版本,但4.8.3我。请指教?

C:\Users\jasharma\gitrepo\Protractor Framework\customer-portal>npm install -g 
npm WARN deprecated [email protected]: All versions below 4.0.1 of Nodemailer are deprecated. See https://nodemailer.com/status/ 
npm WARN engine [email protected]: wanted: {"node":">= 6.9.0"} (current: {"node":"4.8.3","npm":"2.15.11"}) 
npm WARN peerDependencies The peer dependency [email protected]>=0.9 included from karma-junit-reporter will no 
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency 
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly. 
npm WARN deprecated [email protected]: This module is deprecated 
npm WARN deprecated [email protected]: Use uuid module instead 
npm WARN engine [email protected]: wanted: {"node":">=4","npm":">=3"} (current: {"node":"4.8.3","npm":"2.15.11"}) 

> [email protected] install C:\Users\jasharma\AppData\Roaming\npm\node_modules\npmpackages\node_modules\chromedriver 
> node install.js 

module.js:327 
    throw err; 
    ^

Error: Cannot find module '../dotjs/validate' 
    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> (C:\Users\jasharma\AppData\Roaming\npm\node_modules\npmpackages\node_modules\request\node_modules\har-validator\node_modules\ajv\lib\compile\index.js:18:25) 
    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 [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue 
npm WARN optional dep failed, continuing [email protected] 
npm ERR! Windows_NT 10.0.14393 
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" 
npm ERR! node v4.8.3 
npm ERR! npm v2.15.11 
npm ERR! code ELIFECYCLE 

npm ERR! [email protected] install: `node install.js` 
npm ERR! Exit status 1 
npm ERR! 
npm ERR! Failed at the [email protected] install script 'node install.js'. 
npm ERR! This is most likely a problem with the chromedriver 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 chromedriver 
npm ERR! Or if that isn't available, you can get their info via: 
npm ERR! 
npm ERR!  npm owner ls chromedriver 
npm ERR! There is likely additional logging output above. 

npm ERR! Please include the following file with any support request: 
npm ERR!  C:\Users\jasharma\gitrepo\Protractor Framework\customer-portal\npm-debug.log 

C:\Users\jasharma\gitrepo\Protractor Framework\customer-portal> 
+0

你在安装什么? – evolutionxbox

+0

嗨有我的package.json中的模块列表,但错误命中chromedriver – Jatin

回答

0

或者:

  • 更新的CI工具,以便它可以在一个现代版的NodeJS
  • 使用像nvm的工具在同一时间安装的NodeJS的多个版本运行