繁体   English   中英

无法安装node.js模块

[英]Cannot install node.js module

我的CI工具使用节点版本4.8.3。 因此,我不得不将本地node.js从6回滚到4.8.3。 现在,当我执行npm install -g ,会看到以下错误。

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

C:\Users\jasharma\gitrepo\Protractor Framework\customer-portal>npm install -g
npm WARN deprecated nodemailer@0.7.1: All versions below 4.0.1 of Nodemailer are deprecated. See https://nodemailer.com/status/
npm WARN engine selenium-webdriver@3.4.0: wanted: {"node":">= 6.9.0"} (current: {"node":"4.8.3","npm":"2.15.11"})
npm WARN peerDependencies The peer dependency karma@>=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 mimelib@0.2.19: This module is deprecated
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
npm WARN engine webdriver-manager@10.3.0: wanted: {"node":">=4","npm":">=3"} (current: {"node":"4.8.3","npm":"2.15.11"})

> chromedriver@2.30.1 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 minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN optional dep failed, continuing fsevents@1.1.2
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! chromedriver@2.30.1 install: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the chromedriver@2.30.1 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>

或者:

  • 更新CI工具,使其可以在现代版本的NodeJS上运行
  • 使用nvm之类的工具同时安装多个版本的NodeJS

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM