2014-06-07 65 views
3

我得到一個錯誤,當我運行此命令:鬼安裝NPM

npm install --production 

請幫助。

npm ERR! install Couldn't read dependencies 
npm ERR! package.json ENOENT, open '/root/package.json' 
npm ERR! package.json This is most likely not a problem with npm itself. 
npm ERR! package.json npm can't find a package.json file in your current directory. 

npm ERR! System Linux 2.6.32-042stab088.4 
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "--production" 
npm ERR! cwd /root 
npm ERR! node -v v0.10.28 
npm ERR! npm -v 1.4.4 
npm ERR! path /root/package.json 
npm ERR! code ENOPACKAGEJSON 
npm ERR! errno 34 
npm ERR! 
npm ERR! Additional logging details can be found in: 
npm ERR! /root/npm-debug.log 
npm ERR! not ok code 0 

我試圖用Ghost在目錄中執行該命令。就出來了這個錯誤:

[email protected] install /var/www/node_modules/sqlite3 node-pre-gyp install --fallback-to-build

/usr/bin/env: node: No such file or directory 
npm WARN This failure might be due to the use of legacy binary "node" 
npm WARN For further explanations, please read 
/usr/share/doc/nodejs/README.Debian 

npm ERR! [email protected] install: `node-pre-gyp install --fallback-to-build` 
npm ERR! Exit status 127 
npm ERR! 
npm ERR! Failed at the [email protected] install script. 
npm ERR! This is most likely a problem with the sqlite3 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 their info via: 
npm ERR!  npm owner ls sqlite3 
npm ERR! There is likely additional logging output above. 

npm ERR! System Linux 2.6.32-042stab088.4 
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "--production" 
npm ERR! cwd /var/www 
npm ERR! node -v v0.10.28 
npm ERR! npm -v 1.4.4 
npm ERR! code ELIFECYCLE 
npm ERR! 
npm ERR! Additional logging details can be found in: 
npm ERR!  /var/www/npm-debug.log 
npm ERR! not ok code 0` 
+0

我試圖用Ghost在目錄中執行該命令。並出來這個錯誤: – md23

回答

2

從你的輸出,在我看來,你是不是在Ghost的安裝目錄。您能否請嘗試將cd複製到Ghost源所在的目錄並再次運行該命令?

+1

仍然有一個問題。 –