2016-09-29 117 views
0

我是新來的節點js。開始建立節點js項目。npm start命令給出錯誤:http-server:命令未找到,代碼:ELIFECYCLE

使用npm start命令時出現錯誤。

NPM啓動

> [email protected] start /usr/local/UserProfile/TitanUI 
> http-server -p 8080  
sh: http-server: command not found  
npm ERR! Linux 2.6.32-504.8.1.el6.x86_64 
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "start" 
npm ERR! node v6.7.0 
npm ERR! npm v3.10.3 
npm ERR! file sh 
npm ERR! code ELIFECYCLE 
npm ERR! errno ENOENT 
npm ERR! syscall spawn 
npm ERR! [email protected] start: `http-server -p 8080` 
npm ERR! spawn ENOENT 
npm ERR! Failed at the [email protected] start script 'http-server -p 8080'. 
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 sigma package, 
npm ERR! not with npm itself. 
npm ERR! Tell the author that this fails on your system: 
npm ERR!  http-server -p 8080 
npm ERR! You can get information on how to open an issue for this project with: 
npm ERR!  npm bugs sigma 
npm ERR! Or if that isn't available, you can get their info via: 
npm ERR!  npm owner ls sigma 
npm ERR! There is likely additional logging output above. 
npm ERR! Please include the following file with any support request: 
npm ERR!  /usr/local/UserProfile/TitanUI/npm-debug.log 

這些是CentOS的,NPM和節點JS版本。

的CentOS:6.6

NPM:3.10

的NodeJS:6.7.0 我想我有最新版本的only..Please幫助我,如果任何人知道這件事。

+1

你可以請你發佈你的package.json文件嗎? –

+0

嗨問題解決了謝謝..刪除節點模塊和,NPM安裝解決了這個問題... – Ahi

+0

但不應該node_modules文件夾有一個可執行文件? –

回答

0

刪除節點模塊文件夾並再次運行「npm install」和「npm start」。這解決了上述錯誤。謝謝!