2013-05-07 1 views
2

최대한 빨리 응용 프로그램을 배포하고이 튜토리얼의 코드를 밀어 같이 http://blog.superpat.com/2011/06/14/node-js-chat-demo-on-heroku/Heroku App은 로그에 따라 계속 충돌합니다 ... 왜?

내가 Heroku가이 오류를받은 :. " 오류가 응용 프로그램에서 발생하여 페이지를 제공 할 수 없습니다 다시 시도하십시오

응용 프로그램 소유자 인 경우 로그에서 자세한 내용을 확인하십시오. "

여기에 내가 갖는 로그 오류입니다 :

2013-05-07T12:46:21.537628+00:00 app[web.1]: module.js:340 
2013-05-07T12:46:21.537946+00:00 app[web.1]:  throw err; 
2013-05-07T12:46:21.538118+00:00 app[web.1]:   ^
2013-05-07T12:46:21.540143+00:00 app[web.1]: Error: Cannot find module 'pg' 
2013-05-07T12:46:21.540143+00:00 app[web.1]:  at Function.Module._resolveFilename (module.js:338:15) 
2013-05-07T12:46:21.540143+00:00 app[web.1]:  at Function.Module._load (module.js:280:25) 
2013-05-07T12:46:21.540143+00:00 app[web.1]:  at require (module.js:380:17) 
2013-05-07T12:46:21.540143+00:00 app[web.1]:  at Object.<anonymous> (/app/server.js:22:10) 
2013-05-07T12:46:21.540143+00:00 app[web.1]:  at Module._compile (module.js:456:26) 
2013-05-07T12:46:21.540143+00:00 app[web.1]:  at Object.Module._extensions..js (module.js:474:10) 
2013-05-07T12:46:21.540143+00:00 app[web.1]:  at Module.load (module.js:356:32) 
2013-05-07T12:46:21.540143+00:00 app[web.1]:  at Module.require (module.js:364:17) 
2013-05-07T12:46:21.540462+00:00 app[web.1]:  at Function.Module.runMain (module.js:497:10) 
2013-05-07T12:46:21.540143+00:00 app[web.1]:  at Function.Module._load (module.js:312:12) 
2013-05-07T12:46:22.755998+00:00 heroku[web.1]: Process exited with status 8 
2013-05-07T12:47:21.212523+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=nodechatclient.herokuapp.com fwd="72.229.150.213" dyno= connect= service= status=503 bytes= 
2013-05-07T12:47:22.593111+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=nodechatclient.herokuapp.com fwd="72.229.150.213" dyno= connect= service= status=503 bytes= 

내가 자습서 'GitHub의 그 모든 코드를 따랐다.

무엇이 원인 일 수 있습니까? 그것은 Pg와 관련이 있습니까? 데이터베이스 경로를 어딘가로 변경해야합니까?

Error: Cannot find module '/home/euridice/node_modules/pg/lib/native/../../build/default/binding' 
at Function.Module._resolveFilename (module.js:338:15) 
at Function.Module._load (module.js:280:25) 
at Module.require (module.js:364:17) 
at require (module.js:380:17) 
at Object.<anonymous> (/home/euridice/node_modules/pg/lib/native/index.js:16:13) 
at Module._compile (module.js:456:26) 
at Object.Module._extensions..js (module.js:474:10) 
at Module.load (module.js:356:32) 
at Function.Module._load (module.js:312:12) 
at Module.require (module.js:364:17) 

그게 무슨 뜻 이죠 :

내가 노드 server.js를 사용하여 로컬로 실행하려고

그러나 나는이 오류가?

편집 : 몇 가지를 수정했습니다 지금은 받고 있어요 :

events.js:72 
    throw er; // Unhandled 'error' event 
     ^
Error: FATAL: password authentication failed for user "postgres" 
FATAL: password authentication failed for user "postgres" 

at Connection.<anonymous> (/home/euridice/node_chat/node_modules/pg/lib/native/index.js:187:17) 
at Connection.EventEmitter.emit (events.js:95:17) 
+0

PG 모듈이 앱에 종속물로 설치되어 있지 않은 것처럼 냄새가납니다. –

+0

나중에 채팅 서버에 지속성이 추가되었습니다. Postgres를 package.json 파일에 종속성으로 추가 했습니까? 나중에 원래 블로그 게시물에서 이것을 수행하는 방법에 대한 예제가 있지만, 포스트그레스에 1.1.0 버전을 사용하는 것이 좋습니다 (블로그 게시물에 제공된 버전 0.5가 아닌). 감사합니다 – jr0cket

+0

@ JR0cket, 아니, 아니. 나는 그것을 조심한다고 생각합니다. 내 편집을 참조하십시오. 포스트그레스를 종속물로 추가하는 방법은 어디에서 찾을 수 있습니까? 나는 그것을 발견 할 수 없다. –

답변

2

실행도

npm install 
로컬

및 Heroku가에

편집을 "node_modules"폴더를 밀어 : 나는 당신이 자식과 herkoku 개념을 오해 한 것 같아요. 당신이 필요합니다. 당신이) 당신의 node_chat 폴더에 있어야합니다

1. clone the repository: 'git clone git://github.com/metadaddy-sfdc/node_chat.git' 
2. go into the repository: 'cd node_chat' 
3. now you can run 'npm install' in THAT folder 
4. after that you can create your heroku app: 'heroku create' 
5. and deploy that to heroku: 
    5.1 git add . 
    5.2 git commit -m "some comment" 
    5.3 git push heroku master 

, b)는 최초의 NPM에게 Heroku에 (자식 추가)를 설치하고 모든 것을 밀어!

+0

"npm ERR! install 종속성을 읽을 수 없습니다. npm ERR! 오류 : ENOENT, '/ home /euridice/package.json ' npm ERR! 도움이 필요하면 다음 로그에서이 로그를보고 할 수 있습니다. npm ERR! npm ERR! System Linux 3.5. 0-27- 일반 npm ERR! 명령 "/ usr/bin/node" "/ usr/bin/npm" "설치" npm ERR! cwd/home/euridice npm ERR! node -v v0.10.5 npm ERR! npm -v 1.2.18 npm ERR 경로 /home/euridice/package.json npm ERR! code ENOENT npm ERR! errno 34 npm ERR! not ok code 0 " –

+0

npm을 설치할 때 얻는 것입니다. –

+0

또한, git push node_modules 치명적 : 'node_modules'가 자식 저장소가 아닙니다. 치명적 : 원격 종료가 예기치 않게 중단되었습니다. –

관련 문제