Node.js npm安装npm错误退出状态8

Node.js npm安装npm错误退出状态8,node.js,npm,phantomjs,teamcity,npm-install,Node.js,Npm,Phantomjs,Teamcity,Npm Install,在生成代理上在teamcity中生成项目时出现以下错误。这是两天前在同一个代理上工作的,现在出现以下错误。请帮忙 如果有帮助的话,我已经在这里更新了完整的日志。这对于我刚刚加入的teamcity来说是失败的。我正在为应用程序提供支持,但仍在学习如何调试这些问题。任何帮助都将不胜感激,即使是外行的话。谢谢各位 Step 1/5: install dependencies (Node.js NPM) (12s) [Step 1/5] npm install (12s) [npm ins

在生成代理上在teamcity中生成项目时出现以下错误。这是两天前在同一个代理上工作的,现在出现以下错误。请帮忙

如果有帮助的话,我已经在这里更新了完整的日志。这对于我刚刚加入的teamcity来说是失败的。我正在为应用程序提供支持,但仍在学习如何调试这些问题。任何帮助都将不胜感激,即使是外行的话。谢谢各位

 Step 1/5: install dependencies (Node.js NPM) (12s) 
    [Step 1/5] npm install (12s) 
[npm install] Executing npm via wrapping shell script
[npm install] Starting: /opt/home/teamcity/BuildAgent2/temp/agentTmp/wrapper3833224454633074147.sh install
[npm install] in directory: /opt/home/teamcity/BuildAgent2/work/cd110a4ceada3f8c
 [npm install] npm WARN package.json Adidas_ESS@0.1.0 No repository field.
 [npm install] npm WARN engine hoek@2.16.3: wanted: {"node":">=0.10.40"} (current: {"node":"0.10.38","npm":"1.4.28"})
 [npm install] npm WARN engine cryptiles@2.0.5: wanted: {"node":">=0.10.40"} (current: {"node":"0.10.38","npm":"1.4.28"})
 [npm install] npm WARN engine boom@2.10.1: wanted: {"node":">=0.10.40"} (current: {"node":"0.10.38","npm":"1.4.28"})
 [npm install]
 [npm install] > phantomjs-prebuilt@2.1.13 install /opt/home/teamcity/BuildAgent2/work/cd110a4ceada3f8c/node_modules/karma-phantomjs-launcher/node_modules/phantomjs-prebuilt
[npm install] > node install.js
[npm install] 
[npm install] 
[npm install] module.js:340
[npm install]     throw err;
[npm install]           ^
[npm install] Error: Cannot find module '/opt/home/teamcity/BuildAgent2/work/cd110a4ceada3f8c/node_modules/karma-phantomjs-launcher/node_modules/phantomjs-prebuilt/install.js'
[npm install]     at Function.Module._resolveFilename (module.js:338:15)
[npm install]     at Function.Module._load (module.js:280:25)
[npm install]     at Function.Module.runMain (module.js:497:10)
[npm install]     at startup (node.js:119:16)
[npm install]     at node.js:935:3
[npm install] npm WARN engine hoek@2.16.3: wanted: {"node":">=0.10.40"} (current: {"node":"0.10.38","npm":"1.4.28"})
[npm install] npm WARN engine cryptiles@2.0.5: wanted: {"node":">=0.10.40"} (current: {"node":"0.10.38","npm":"1.4.28"})
[npm install] npm WARN engine boom@2.10.1: wanted: {"node":">=0.10.40"} (current: {"node":"0.10.38","npm":"1.4.28"})
[npm install] 
[npm install] > phantomjs-prebuilt@2.1.13 install /opt/home/teamcity/BuildAgent2/work/cd110a4ceada3f8c/node_modules/grunt-contrib-qunit/node_modules/grunt-lib-phantomjs/node_modules/phantomjs-prebuilt
[npm install] > node install.js
[npm install] 
[npm install] 
[npm install] module.js:340
[npm install]     throw err;
[npm install]           ^
[npm install] Error: Cannot find module '/opt/home/teamcity/BuildAgent2/work/cd110a4ceada3f8c/node_modules/grunt-contrib-qunit/node_modules/grunt-lib-phantomjs/node_modules/phantomjs-prebuilt/install.js'
[npm install]     at Function.Module._resolveFilename (module.js:338:15)
[npm install]     at Function.Module._load (module.js:280:25)
[npm install]     at Function.Module.runMain (module.js:497:10
[npm install]     at startup (node.js:119:16)
[npm install]     at node.js:935:3 
[npm install]  

[npm install] npm ERR! phantomjs-prebuilt@2.1.13 install: `node install.js` 
    [npm install] npm ERR! Exit status 8 
    [npm install] npm ERR! 
    [npm install] npm ERR! Failed at the phantomjs-prebuilt@2.1.13 install script. 
    [npm install] npm ERR! This is most likely a problem with the phantomjs-prebuilt package, 
    [npm install] npm ERR! not with npm itself. 
    [npm install] npm ERR! Tell the author that this fails on your system: 
    [npm install] npm ERR! node install.js 
    [npm install] npm ERR! You can get their info via: 
    [npm install] npm ERR! npm owner ls phantomjs-prebuilt 
    [npm install] npm ERR! There is likely additional logging output above. 
    [npm install] npm ERR! System Linux 2.6.18-409.el5 
    [npm install] npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" 
    [npm install] npm ERR! cwd /opt/home/teamcity/BuildAgent2/work/cd110a4ceada3f8c 
    [npm install] npm ERR! node -v v0.10.38 
    [npm install] npm ERR! npm -v 1.4.28 
    [npm install] npm ERR! code ELIFECYCLE 
    [npm install] npm ERR! not ok code 0 
    [Step 1/5] Step install dependencies (Node.js NPM) failed

看起来它正在尝试安装最新的软件包,但该软件包已损坏。编辑package.json并查找PhantomJS的版本。它将如下所示:

"phantomjs-prebuilt": "^2.1.7"

取出其前面的“^”以安装完全指定的版本。您的生成失败,因为它正在尝试安装指定包的更新版本,而该包已损坏。“^”告诉您至少要安装指定的版本,但要获得可用的最新版本。

看起来它正在尝试安装最新的软件包,但这是错误的。编辑package.json并查找PhantomJS的版本。它将如下所示:

"phantomjs-prebuilt": "^2.1.7"

取出其前面的“^”以安装完全指定的版本。您的生成失败,因为它正在尝试安装指定包的更新版本,而该包已损坏。“^”告诉您至少要安装指定的版本,但要获得可用的最新版本。

请尝试
npm install--verbose
以获得更多输出。很可能是关于phantomjs postinstall脚本的,可能会将构建依赖项中phantomjs的版本号从“*”更改为以前的onetry
npm安装--verbose
,以获得更多输出。最有可能是关于phantomjs postinstall脚本可能会将构建依赖项中phantomjs的版本号从“*”更改为以前的版本Hi@boyan我对此非常陌生,因为我们为teamcity上的其他人提供了支持,但在特定代理上构建失败,但在其他代理上工作。我必须为用户解决这个问题。有什么办法吗?如果您的构建在其他代理上工作,而不是在一个代理上工作,那么这就是该代理的问题,也可能是package.json文件的问题。请更新您的问题,以提供package.json。您好@boyan我对此非常陌生,因为我们为teamcity上的其他人提供支持,但在其他代理上的构建失败。我必须为用户解决这个问题。有什么办法吗?如果您的构建在其他代理上工作,而不是在一个代理上工作,那么这就是该代理的问题,也可能是package.json文件的问题。您能否更新您的问题以提供package.json?