2014-04-22 3 views
0

전 노드에 익숙하지 않습니다. 누군가 이것이 왜 실패하고 있는지 말해 줄 수 있습니까?`npm` 설치 오류를 이해하려고 시도 중입니다.

sudo su 
nvm use 0.10 
git clone https://github.com/bitpay/insight.git && cd insight 
npm install 

... 출력 생략 ...

> [email protected] install /insight/node_modules/insight-bitcore-api/node_modules/leveldown 
> node-gyp rebuild 

gyp: Call to 'node -e "require('nan')"' returned exit status 1. while trying to load binding.gyp 
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1 
gyp ERR! stack  at ChildProcess.onCpExit (/usr/share/node-gyp/lib/configure.js:431:16) 
gyp ERR! stack  at ChildProcess.EventEmitter.emit (events.js:98:17) 
gyp ERR! stack  at Process.ChildProcess._handle.onexit (child_process.js:797:12) 
gyp ERR! System Linux 3.11.0-19-generic 
gyp ERR! command "nodejs" "/usr/bin/node-gyp" "rebuild" 
gyp ERR! cwd /insight/node_modules/insight-bitcore-api/node_modules/leveldown 
gyp ERR! node -v v0.10.25 
gyp ERR! node-gyp -v v0.10.10 
gyp ERR! not ok 

...

npm ERR! Error: ENOENT, lstat '/insight/node_modules/insight-bitcore-api/node_modules/bitcore/node_modules/browserify/node_modules/crypto-browserify/test/vectors/byte0002.dat' 
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 Linux 3.11.0-19-generic 
npm ERR! command "/root/.nvm/v0.10.26/bin/node" "/root/.nvm/v0.10.26/bin/npm" "install" 
npm ERR! cwd /insight 
npm ERR! node -v v0.10.26 
npm ERR! npm -v 1.4.3 
npm ERR! path /insight/node_modules/insight-bitcore-api/node_modules/bitcore/node_modules/browserify/node_modules/crypto-browserify/test/vectors/byte0002.dat 
npm ERR! fstream_path /insight/node_modules/insight-bitcore-api/node_modules/bitcore/node_modules/browserify/node_modules/crypto-browserify/test/vectors/byte0002.dat 
npm ERR! fstream_type File 
npm ERR! fstream_class FileWriter 
npm ERR! code ENOENT 
npm ERR! errno 34 
npm ERR! fstream_stack /root/.nvm/v0.10.26/lib/node_modules/npm/node_modules/fstream/lib/writer.js:284:26 
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15) 
npm ERR! error rolling back Error: ENOTEMPTY, rmdir '/insight/node_modules/insight-bitcore-api/node_modules/bitcore/node_modules/browserify/node_modules/timers-browserify/node_modules/process' 
npm ERR! error rolling back [email protected] { [Error: ENOTEMPTY, rmdir '/insight/node_modules/insight-bitcore-api/node_modules/bitcore/node_modules/browserify/node_modules/timers-browserify/node_modules/process'] 
npm ERR! error rolling back errno: 53, 
npm ERR! error rolling back code: 'ENOTEMPTY', 
npm ERR! error rolling back path: '/insight/node_modules/insight-bitcore-api/node_modules/bitcore/node_modules/browserify/node_modules/timers-browserify/node_modules/process' } 
npm ERR! [email protected] install: `node-gyp rebuild` 
npm ERR! Exit status 1 
npm ERR! 
npm ERR! Failed at the [email protected] install script. 
npm ERR! This is most likely a problem with the leveldown 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 leveldown 
npm ERR! There is likely additional logging output above. 

npm ERR! System Linux 3.11.0-19-generic 
npm ERR! command "/root/.nvm/v0.10.26/bin/node" "/root/.nvm/v0.10.26/bin/npm" "install" 
npm ERR! cwd /insight 
npm ERR! node -v v0.10.26 
npm ERR! npm -v 1.4.3 
npm ERR! code ELIFECYCLE 

이 어떤 통찰력을 알 수있다! 나는 첫 번째 ERR 블록을 나열하고있어 ...

+0

당신이'node' 설치되어 있습니까 : 상당히 관련이없는 유래의 게시물에서

npm install -g Haraka 

솔루션입니다하려고 할 때 내 경우

는 당신과 같은 오류가 등장! –

+0

모듈을 설치하려는 디렉토리에 올바른 권한이 있습니까? – mscdex

+0

더 이상 문제가 없습니다. 내 VM에서 루트 사용자로 설치를 중단했습니다. – jcalfee314

답변

2

이 라인 :

/빈/SH : 1 : 노드 :

날 노드가 제대로 설치되지 믿고 리드를 찾을 수 없습니다 .. 명령 줄에 '노드'를 입력하면 어떻게됩니까?

+1

이 특별한 오류는'sudo '를 사용할 때만 노드에 접근 할 수 없다는 것이 었습니다. 이는 노드 설치 f}에 따라 전적으로 가능합니다. – mscdex

+0

'apt-get install node'가이 오류를 처리했습니다. 나는이 대답을 upvoting, 고마워. 불행하게도 이것은 여전히 ​​다음 오류를 남기고있다.'gyp : 'node -e'require ('nan') ''는 종료 상태 1을 반환했다. 위의 오류를 업데이트했습니다 (변경된 사항은 보이지 않지만). – jcalfee314

+0

require 'nan'오류는 npm 버전과 관련이있을 수 있습니다. https://github.com/bitpay/insight/issues/461 – jcalfee314

0

(이미 어느 정도 설치되었지만) npm 설치 노드를 실행했는데 문제가 해결되었습니다.

3

는 명령 줄에서 노드에 액세스 할 수 nodejs이 필요합니다.

그러나 : 우분투의 repos에서 nodejsAX25 노드 사이에 혼란/충돌, 후자의 점유는/usr/빈/노드 경로가있다. 당신은 노드 단순히

sudo aptitude install nodejs-legacy 

이 nodejs에게 를 설치하고에/usr/빈/노드에 대한 심볼릭 링크를 생성 일명 AX25-노드를 설치하지합니다.

이제 npm 설치가 오류 메시지없이 실행됩니다. nodejs vs node on ubuntu 12.04

관련 문제