2017-09-21 5 views
0

hummus.js 모듈을 사용하는 API를 만들었습니다. Localy 테스트 -> 잘 작동합니다.Plesk 설치 npm 패키지 오류

이제 API를 업로드하고 npm install을 실행하여 모든 종속성을 설치하려고합니다. 하지만이 오류가 발생했습니다 :

npm-Installation 
Execution filemng has failed with exit code 1, stdout: 
> [email protected] install /var/www/vhosts/XXX/XXX/node_modules/hummus 
> node-pre-gyp install --fallback-to-build 
, stderr: npm WARN lifecycle npm is using /opt/plesk/node/7/bin/node but there is no node binary in the current PATH. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with. 
/usr/bin/env: 'node': No such file or directory 
npm WARN [email protected] No description 
npm WARN [email protected] No repository field. 
npm WARN [email protected] No license field. 
npm ERR! Linux 4.4.0-21-generic 
npm ERR! argv "/opt/plesk/node/7/bin/node" "/opt/plesk/node/7/bin/npm" "install" 
npm ERR! node v7.4.0 
npm ERR! npm v4.0.5 
npm ERR! file sh 
npm ERR! code ELIFECYCLE 
npm ERR! errno ENOENT 
npm ERR! syscall spawn 
npm ERR! [email protected] install: `node-pre-gyp install --fallback-to-build` 
npm ERR! spawn ENOENT 
npm ERR! 
npm ERR! Failed at the [email protected] install script 'node-pre-gyp install --fallback-to-build'. 
npm ERR! Make sure you have the latest version of node.js and npm installed. 
npm ERR! If you do, this is most likely a problem with the hummus package, 
npm ERR! not with npm itself. 
npm ERR! Tell the author that this fails on your system: 
npm ERR! node-pre-gyp install --fallback-to-build 
npm ERR! You can get information on how to open an issue for this project with: 
npm ERR! npm bugs hummus 
npm ERR! Or if that isn't available, you can get their info via: 
npm ERR! npm owner ls hummus 
npm ERR! There is likely additional logging output above. 
npm ERR! Please include the following file with any support request: 
npm ERR! /var/www/vhosts/XXX/XXX/npm-debug.log 

오류는 hummus-js 패키지에서 발생합니다. 그래서 node-gyp (npm install -g node-gyp)을 설치하려고합니다. 그러나 나는 어떻게 몰라? Plesk에서는 단일 모듈을 설치할 수 없습니다. 내가 ssh를 함께 할 때 내가 가지고 :

command NPM not found

내가 서버 관리자 - 멍청한 놈이야 그래서 모든 도움말 행복 해요!

인사말

편집 : 내가 제대로 가정하면 내 서버 = 우분투 16.04 LTS 서버 64 비트 + Plesk를 오닉스 Plesk NodeJS

+0

'내 API를 업로드했습니다'는 (클라우드 추정) 서버에서 테스트를 시도 했습니까? –

+0

Plesk가 설치된 루트 서버가 있습니다 – Ckappo

답변

0

, 당신이 다른 컴퓨터에 설치 노드를 가지고 있지으로 요약된다. 컴퓨터에 SSH, 다음, 데비안과 우분투 기반의 OS 실행

curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - 
sudo apt-get install -y nodejs 

(당신이 노드 8.x의를 원했다는 것을 다시, 가정), 다음 실행

sudo apt-get install -y build-essential 

및 대한 CentOS 및 기타 엔터프라이즈 Linux OS :

curl --silent --location https://rpm.nodesource.com/setup_8.x | sudo bash - 
sudo yum -y install nodejs 
sudo yum install gcc-c++ make 

그런 다음 다시 시도하십시오.

+0

노드 J가 설치되어 있습니다 (Plesk를 설치하고 API를 사용합니다. 테스트 API는 잘 작동합니다 (테스트 노드 만))하지만 ssh를 사용하면 명령을 찾을 수 없습니다. – Ckappo

+0

ssh 그것을 실행하고 'ls -l/opt/plesk/node'를 실행하면 그 안에 '7'이라는 폴더가 있어야합니다. "echo 'export PATH =/opt/plesk/node/7/bin : $ PATH'>> ~/.bashrc" 로컬에 설치된 노드 일 가능성이 높기 때문에 액세스 할 수 없습니다 전 세계적으로 이것은 이론적으로 문제를 해결해야합니다. –