简体   繁体   English

部署节点应用程序时出现heroku错误

[英]heroku error while deploying node app

I'm trying to deploy an app to heroku. 我正在尝试将应用程序部署到heroku。 Everything was working fine until now.... I don't know what I've done, but everytime I start the process I'm getting this error, 到现在为止,一切正常。...我不知道自己做了什么,但是每次启动流程时,我都会遇到此错误,

2012-12-17T14:36:42+00:00 heroku[web.1]: State changed from up to starting
2012-12-17T14:36:42+00:00 heroku[slugc]: Slug compilation finished
2012-12-17T14:36:44+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2012-12-17T14:36:46+00:00 heroku[web.1]: Process exited with status 1
2012-12-17T14:36:47+00:00 heroku[web.1]: State changed from starting to crashed
2012-12-17T14:36:47+00:00 heroku[web.1]: State changed from crashed to starting
2012-12-17T14:36:48+00:00 heroku[web.1]: Starting process with command `node app.js`
2012-12-17T14:36:49+00:00 app[web.1]: module.js:340
2012-12-17T14:36:49+00:00 app[web.1]:           ^
2012-12-17T14:36:49+00:00 app[web.1]: 
2012-12-17T14:36:49+00:00 app[web.1]:     throw err;
2012-12-17T14:36:49+00:00 app[web.1]: Error: Cannot find module './proto'
2012-12-17T14:36:49+00:00 app[web.1]:     at Function.Module._resolveFilename (module.js:338:15)
2012-12-17T14:36:49+00:00 app[web.1]:     at Function.Module._load (module.js:280:25)
2012-12-17T14:36:49+00:00 app[web.1]:     at Module.require (module.js:362:17)
2012-12-17T14:36:49+00:00 app[web.1]:     at require (module.js:378:17)
2012-12-17T14:36:49+00:00 app[web.1]:     at Object.<anonymous> (/app/node_modules/express/node_modules/connect/lib/connect.js:14:13)
2012-12-17T14:36:49+00:00 app[web.1]:     at Object.Module._extensions..js (module.js:467:10)
2012-12-17T14:36:49+00:00 app[web.1]:     at Module._compile (module.js:449:26)
2012-12-17T14:36:49+00:00 app[web.1]:     at Module.load (module.js:356:32)
2012-12-17T14:36:49+00:00 app[web.1]:     at Function.Module._load (module.js:312:12)
2012-12-17T14:36:49+00:00 app[web.1]:     at Module.require (module.js:362:17)

Anyone? 任何人?

Thanks! 谢谢!

猫鼬版本有问题

Mmmm I think that you are trying to use your own file, with this sentence: 嗯,我认为您正在尝试使用自己的文件,并附有以下语句:

require('./proto');

Do you have your proto.js file in the same directory? 您是否在同一目录中有proto.js文件? It seems to be that it cant find that module. 似乎无法找到该模块。

Check that you have "proto" in your package.json, this error happend because it cant find a dependency 检查package.json中是否有“ proto”,因为未找到依赖项而发生此错误

package.json ex: package.json例如:

{
  "name": "application-name",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "start": "node app"
  },
  "dependencies": {
    "proto": "*"
  }
}

check this: What is dependency in package.json - nodejs 检查以下内容: package.json中的依赖项是什么-Node.js

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM