2015-03-26 3 views
0

У нас есть блок EC2 Ubuntu с Jenkins, который строит и тестирует приложение-узел. Часть того, что делает Дженкинс, зависит от загрузки. Одна из этих зависимостей (хешинг) дает ошибку ELIFECYCLE при ее установке. Ошибка возникает только при установке с пользователем jenkins. Я могу установить sudo с пользователем ubuntu, но я не могу установить этот пакет с пользователем jenkins. Пользователь jenkins может установить все остальные пакеты просто отлично. Вот пример установки хешрин для ubuntu, а не для jenkins, а затем установка jenkins успешно выполняется.npm install failure для модуля jenkins user ELIFECYCLE

Любые идеи? Я чувствую, что читал и все пробовал. Я полностью удалил и переустановил узел, npm и node-gyp и попытался использовать разные комбинации версий каждого из них на основе этой проблемы (https://github.com/TooTallNate/node-gyp/issues/598), но, похоже, это не повлияло.

[email protected]:~$ sudo npm install hashring 
\ 
> [email protected] install /home/ubuntu/node_modules/hashring 
> node-gyp rebuild 

make: Entering directory `/home/ubuntu/node_modules/hashring/build' 
    CXX(target) Release/obj.target/hashvalue/src/hashvalue.o 
    SOLINK_MODULE(target) Release/obj.target/hashvalue.node 
    SOLINK_MODULE(target) Release/obj.target/hashvalue.node: Finished 
    COPY Release/hashvalue.node 
make: Leaving directory `/home/ubuntu/node_modules/hashring/build' 
[email protected] node_modules/hashring 
├── [email protected] 
├── [email protected] 
├── [email protected] 
└── [email protected] 
[email protected]:~$ sudo su root 
[email protected]10:/home/ubuntu# su jenkins 
[email protected]:/home/ubuntu$ cd ~/workspace/test 
[email protected]:~/workspace/test$ npm install hashring 

> [email protected] install /var/lib/jenkins/workspace/test/node_modules/hashring 
> node-gyp rebuild 

gyp ERR! UNCAUGHT EXCEPTION 
gyp ERR! stack Error: spawn ENOTDIR 
gyp ERR! stack  at exports._errnoException (util.js:746:11) 
gyp ERR! stack  at ChildProcess.spawn (child_process.js:1155:11) 
gyp ERR! stack  at exports.spawn (child_process.js:988:9) 
gyp ERR! stack  at exports.execFile (child_process.js:682:15) 
gyp ERR! stack  at checkPythonVersion (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:79:5) 
gyp ERR! stack  at /usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:46:9 
gyp ERR! stack  at which (/usr/local/lib/node_modules/npm/node_modules/which/which.js:30:31) 
gyp ERR! stack  at checkPython (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:36:5) 
gyp ERR! stack  at configure (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:31:3) 
gyp ERR! stack  at Object.self.commands.(anonymous function) [as configure] (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/node-gyp.js:66:37) 
gyp ERR! System Linux 3.13.0-36-generic 
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" 
gyp ERR! cwd /var/lib/jenkins/workspace/test/node_modules/hashring 
gyp ERR! node -v v0.12.1 
gyp ERR! node-gyp -v v1.0.3 
gyp ERR! This is a bug in `node-gyp`. 
gyp ERR! Try to update node-gyp and file an Issue if it does not help: 
gyp ERR!  <https://github.com/TooTallNate/node-gyp/issues> 
npm ERR! Linux 3.13.0-36-generic 
npm ERR! argv "node" "/usr/local/bin/npm" "install" "hashring" 
npm ERR! node v0.12.1 
npm ERR! npm v2.7.3 
npm ERR! code ELIFECYCLE 

npm ERR! [email protected] install: `node-gyp rebuild` 
npm ERR! Exit status 7 
npm ERR! 
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'. 
npm ERR! This is most likely a problem with the hashring package, 
npm ERR! not with npm itself. 
npm ERR! Tell the author that this fails on your system: 
npm ERR!  node-gyp rebuild 
npm ERR! You can get their info via: 
npm ERR!  npm owner ls hashring 
npm ERR! There is likely additional logging output above. 

npm ERR! Please include the following file with any support request: 
npm ERR!  /var/lib/jenkins/workspace/test/npm-debug.log 
[email protected]:~/workspace/test$ npm install express 
[email protected] node_modules/express 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] ([email protected]) 
├── [email protected] 
├── [email protected] ([email protected]) 
├── [email protected] ([email protected], [email protected]) 
├── [email protected] ([email protected]) 
├── [email protected] ([email protected], [email protected], [email protected]) 
├── [email protected] ([email protected], [email protected]) 
└── [email protected] ([email protected], [email protected]) 
[email protected]:~/workspace/test$ 

ответ

0

Оказывается, нам пришлось добавить конфигурацию для npm с помощью пути python.

От пользователя Дженкинс:

НПМ конфигурационный набор питона/USR/BIN/питон

Смежные вопросы