2016-09-06 9 views
1

"트뤼플"을 npm과 함께 설치하려고하는데 NodeJS에 익숙하지 않아서 npm을 설치하지 않는 이유를 알 수 없습니다. 나는 관리자 권한으로 PowerShell에서 npm install -g truffle을 시도하고 출력의 몇 줄의 후 나는 오류 메시지의 블록 수 :NPM은 Windows에서 "truffle"을 설치할 수 없습니다.

npm ERR! Windows_NT 10.0.14393 
npm ERR! argv "F:\\nodeJS\\node.exe" "F:\\nodeJS\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "truffle" 
npm ERR! node v4.5.0 
npm ERR! npm v2.15.9 
npm ERR! code ELIFECYCLE 

npm ERR! [email protected] install: `node-gyp rebuild` 
npm ERR! Exit status 1 
npm ERR! 
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'. 
npm ERR! This is most likely a problem with the scrypt 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 information on how to open an issue for this project with: 
npm ERR!  npm bugs scrypt 
npm ERR! Or if that isn't available, you can get their info via: 
npm ERR! 
npm ERR!  npm owner ls scrypt 
npm ERR! There is likely additional logging output above. 

npm ERR! Please include the following file with any support request: 
npm ERR!  F:\eth_truffle\npm-debug.log 

후 :

gyp ERR! build error 
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1 
gyp ERR! stack  at ChildProcess.onExit (F:\nodeJS\node_modules\npm\node_modules\node-gyp\lib\build.js:276:23) 
gyp ERR! stack  at emitTwo (events.js:87:13) 
gyp ERR! stack  at ChildProcess.emit (events.js:172:7) 
gyp ERR! stack  at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12) 
gyp ERR! System Windows_NT 10.0.14393 
gyp ERR! command "F:\\nodeJS\\node.exe" "F:\\nodeJS\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" 
gyp ERR! cwd C:\Users\Max\AppData\Roaming\npm\node_modules\truffle\node_modules\ether-pudding\node_modules\ethereumjs-testrpc\node_modules\ethereumjs-wallet\node_modules\scrypt.js\node_modules\scrypt 
gyp ERR! node -v v4.5.0 
gyp ERR! node-gyp -v v3.4.0 
gyp ERR! not ok\ 

그리고이 후 많은 많은 노란색 라인 후에 나는 마침내 얻을 그 밖의 일은 일어나지 않고 얼마 지나지 않아 종료됩니다. 현재 디렉토리에 하나의 로그 파일이 아닌 파일이 없으며 "truffle"키워드는 cmd/powershell에서도 찾을 수 없습니다.

내가 이전에 NodeJS에서 일한 적이 없으며이 모든 것이 무엇을 의미하는지 전혀 알지 못합니다. 트러 플 달리기를하기 위해 내가 할 수있는 일은 무엇입니까?

답변

4

설치가 node-gyp rebuild에서 실패합니다. 이 문제에 대한 해결책은 node-gyp repo에 나와 있습니다. 가장 빠른 것은 다음과 같습니다.

"옵션 1 : 관리자 권한으로 실행되는 상승 된 PowerShell 또는 CMD.exe에서 npm install --global --production windows-build-tools을 사용하여 Microsoft의 windows-build-tools를 사용하여 필요한 모든 도구 및 구성을 설치하십시오." 이렇게하면 Python과 Visual Studio가 올바르게 설치됩니다.

또한 노드 4.5를 사용하고 있습니다. 권장 버전은 Truffle Docs

에 따라 5+입니다.