2015-11-04 69 views
0

我一直在試圖上傳一個項目到一個dokku服務器用下面一行。錯誤:當我做混帳推送時找不到模塊'socket.io'

混帳推dokku主

所以當項目啓動要上傳出現這樣的錯誤:

----->運行預檢

For more efficient zero downtime deployments, create a file CHECKS. 

    See http://progrium.viewdocs.io/dokku/checks-examples.md for examples 

    CHECKS file not found in container: Running simple container check... 

---- - >等待10秒...

遠程:應用程序容器無法啓動!

=====>聊天容器輸出:

> @ start /app 
    > node ./doc/node_servers/cobrowsing/server.js 
    module.js:339 
     throw err; 
    ^

    Error: Cannot find module '/usr/local/lib/node_modules/socket.io' 
     at Function.Module._resolveFilename (module.js:337:15) 
     at Function.Module._load (module.js:287:25) 
     at Module.require (module.js:366:17) 
     at require (module.js:385:17) 
     at Object.<anonymous> (/app/doc/node_servers/cobrowsing/server.js:4:10) 
     at Module._compile (module.js:425:26) 
     at Object.Module._extensions..js (module.js:432:10) 
     at Module.load (module.js:356:32) 
     at Function.Module._load (module.js:311:12) 
     at Function.Module.runMain (module.js:457:10) 
    npm ERR! Linux 3.13.0-57-generic 
    npm ERR! argv "/app/.heroku/node/bin/node" "/app/.heroku/node/bin/npm" "start" 
    npm ERR! node v5.0.0 

    npm ERR! npm v3.3.6 
    npm ERR! code ELIFECYCLE 
    npm ERR! @ start: `node ./doc/node_servers/cobrowsing/server.js` 
    npm ERR! Exit status 1 
    npm ERR! 
    npm ERR! Failed at the @ start script 'node ./doc/node_servers/cobrowsing/server.js'. 
    npm ERR! This is most likely a problem with the package, 
    npm ERR! not with npm itself. 
    npm ERR! Tell the author that this fails on your system: 
    npm ERR!  node ./doc/node_servers/cobrowsing/server.js 
    npm ERR! You can get their info via: 
    npm ERR!  npm owner ls 
    npm ERR! There is likely additional logging output above. 
    npm ERR! Please include the following file with any support request: 
    npm ERR!  /app/npm-debug.log 

=====>端聊天容器輸出

遠程:錯誤從守護程序響應:不能殺死容器

244766ea68169dfaabcad927484efa546a5c9e7ba100845183a7595120c7668f :容器

244766ea68169dfaabcad927484efa546a5c9e7ba100845183a7595120c7668f未運行

遠程:錯誤:未能殺死容器:

[244766ea68169dfaabcad927484efa546a5c9e7ba100845183a7595120c7668f]

[email protected]:聊天

! [遠程拒絕]主 - >主(預接收鉤拒絕)

我能做些什麼來解決這個問題並上傳項目?

+0

錯了標籤,IMO。刪除ios&git並添加dokku。也許甚至刪除node.js – feliun

回答

1

檢查你的package.json文件。

使用

npm install socket.io --save 

在項目文件夾中保存上的package.json的依賴關係。 :)

@EDIT

通過筆者: '我解決這個問題,我不得不刪除該文件夾 「node_modules」,然後NPM安裝'

+0

謝謝你的回答,但給我同樣的錯誤@Rodrigo –

+0

@RiveroFelipe你的package.json是否有一個socket.io的引用? – Rodmentou

+0

我解決它,我必須刪除文件夾「node_modules」,然後npm install –