2012-12-17 150 views
0

我想部署一個應用程序到heroku。一切工作正常,直到如今....我不知道我做了什麼,但每次我開始我得到這個錯誤的過程,heroku錯誤,同時部署節點應用程序

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) 

有人嗎?

謝謝!

回答

0

這是一個問題,貓鼬版本

-1

檢查你在你的package.json有 「原」,這個錯誤happend,因爲它無法找到一個依賴

的package.json例如:

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

檢查: What is dependency in package.json - nodejs

+0

我知道這是因爲它找不到它。但這不應該是問題。這是一個依賴關係,因爲連接使用,表達在package.json ....所以它不應該是這樣的。 –

0

嗯我認爲你正在嘗試使用你自己的文件,這句話:

require('./proto'); 

你有你的proto.js文件在同一個目錄下嗎?它似乎是它無法找到該模塊。

相關問題