错误:当我进行git push

时间:2015-11-04 13:41:08

标签: node.js socket.io npm dokku

我一直在尝试使用以下行将项目上传到dokku服务器。

git push dokku master

因此,当项目开始上传时会出现此错误:

- - - - >运行飞行前检查

   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秒......

remote:App容器无法启动!!

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

   > @ 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

=====&GT;结束聊天容器输出

remote:来自守护程序的错误响应:无法杀死容器

244766ea68169dfaabcad927484efa546a5c9e7ba100845183a7595120c7668f:Container

244766ea68169dfaabcad927484efa546a5c9e7ba100845183a7595120c7668f未运行

remote:错误:无法杀死容器:

[244766ea68169dfaabcad927484efa546a5c9e7ba100845183a7595120c7668f]

到dokku@website.com:聊天

! [远程拒绝]主人 - &gt;主人(预先接收挂钩拒绝)

如何解决此问题并上传项目?

1 个答案:

答案 0 :(得分:1)

检查你的package.json文件。

使用

npm install socket.io --save 

在项目文件夹中保存package.json上的依赖项。 :)

<强> @EDIT

作者:&#39;我解决了,我必须删除文件夹&#34; node_modules&#34;,然后npm install&#39;