首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用Jenkins时,NPM安装失败,从命令提示符调用时工作正常

使用Jenkins时,NPM安装失败,从命令提示符调用时工作正常
EN

Stack Overflow用户
提问于 2014-11-19 12:52:23
回答 1查看 2.6K关注 0票数 5

当我试图通过Jenkins运行npm install时,我得到了这样的信息。有很多信息我可以分享,但我希望看一眼就能告诉专家哪里出了问题。如果您觉得需要我的package.json文件或任何其他信息,请留言。

代码语言:javascript
复制
+ npm install
npm WARN `git config --get remote.origin.url` returned wrong result (https://github.com/DaftMonk/grunt-build-control) fatal: failed to stat '.': No such file or directory
npm ERR! git clone https://github.com/DaftMonk/grunt-build-control fatal: Could not change back to 'C:/Windows/system32/config/systemprofile/AppData/Roaming/npm-cache/_git-remotes/https-github-com-DaftMonk-grunt-build-control-7e4d577b': No such file or directory
npm ERR! Error: Command failed: fatal: Could not change back to 'C:/Windows/system32/config/systemprofile/AppData/Roaming/npm-cache/_git-remotes/https-github-com-DaftMonk-grunt-build-control-7e4d577b': No such file or directory
npm ERR! 
npm ERR!     at ChildProcess.exithandler (child_process.js:648:15)
npm ERR!     at ChildProcess.emit (events.js:98:17)
npm ERR!     at maybeClose (child_process.js:756:16)
npm ERR!     at Process.ChildProcess._handle.onexit (child_process.js:823:5)
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR!     <http://github.com/npm/npm/issues>

npm ERR! System Windows_NT 6.1.7601
npm ERR! command "c:\\Program Files\\nodejs\\node.exe" "c:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! cwd C:\Program Files (x86)\Jenkins\jobs\WEB001\workspace
npm ERR! node -v v0.10.30
npm ERR! npm -v 1.4.21
npm ERR! code 128
Build step 'Execute shell' marked build as failure
Finished: FAILURE
EN

回答 1

Stack Overflow用户

发布于 2014-11-19 14:07:50

我感觉windows上的jenkins用户把npm缓存目录弄错了。您可以通过npm config将npm缓存设置为不同的目录。npm配置集缓存C:\blabla\npm-cache --global

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/27009207

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档