I ran into trouble when I deployed my application to Heroku. The build succeeds but for some reason my application is not retrieving the CSS or JS files online. I am using Node.js.
2015-12-23T02:31:28.107602+00:00 heroku[api]: Release v174 created by averybentz#bell.net
2015-12-23T02:31:28.249227+00:00 heroku[slug-compiler]: Slug compilation started
2015-12-23T02:31:28.249232+00:00 heroku[slug-compiler]: Slug compilation finished
2015-12-23T02:31:28.399932+00:00 heroku[web.1]: State changed from up to starting
2015-12-23T02:31:29.599898+00:00 heroku[web.1]: Starting process with command `node index.js`
2015-12-23T02:31:31.936570+00:00 heroku[web.1]: State changed from starting to up
2015-12-23T02:31:35.233051+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2015-12-23T02:31:38.666073+00:00 heroku[web.1]: Process exited with status 143
2015-12-23T02:31:43.695902+00:00 heroku[router]: at=info method=GET path="/" host=allert.herokuapp.com request_id=22c9274d-bf9d-4923-b698-95814e83b2d6 fwd="142.113.215.26" dyno=web.1 connect=1ms service=30ms status=304 bytes=146
2015-12-23T02:31:43.772913+00:00 heroku[router]: at=info method=GET path="/style.css" host=allert.herokuapp.com request_id=10519bb7-dae8-496a-b1b2-3a846ebe8a0c fwd="142.113.215.26" dyno=web.1 connect=1ms service=39ms status=404 bytes=220
2015-12-23T02:31:43.757781+00:00 heroku[router]: at=info method=GET path="/placeholder.js" host=allert.herokuapp.com request_id=a74736e9-1265-440b-9253-04b0460a620c fwd="142.113.215.26" dyno=web.1 connect=1ms service=19ms status=404 bytes=225
2015-12-23T02:34:06.094848+00:00 heroku[api]: Deploy 1b0351b by averybentz#bell.net
2015-12-23T02:34:06.094848+00:00 heroku[api]: Release v175 created by averybentz#bell.net
2015-12-23T02:34:06.227485+00:00 heroku[slug-compiler]: Slug compilation started
2015-12-23T02:34:06.227495+00:00 heroku[slug-compiler]: Slug compilation finished
2015-12-23T02:34:07.634148+00:00 heroku[web.1]: State changed from up to starting
2015-12-23T02:34:08.607774+00:00 heroku[web.1]: Starting process with command `node index.js`
2015-12-23T02:34:10.543910+00:00 app[web.1]: /app/node_modules/express/lib/application.js:209
2015-12-23T02:34:10.543951+00:00 app[web.1]: throw new TypeError('app.use() requires middleware functions');
2015-12-23T02:34:10.543963+00:00 app[web.1]: ^
2015-12-23T02:34:10.543974+00:00 app[web.1]:
2015-12-23T02:34:10.543986+00:00 app[web.1]: TypeError: app.use() requires middleware functions
2015-12-23T02:34:10.543988+00:00 app[web.1]: at Object.<anonymous> (/app/index.js:8:5)
2015-12-23T02:34:10.543987+00:00 app[web.1]: at EventEmitter.use (/app/node_modules/express/lib/application.js:209:11)
2015-12-23T02:34:10.543989+00:00 app[web.1]: at Module._compile (module.js:425:26)
2015-12-23T02:34:10.543989+00:00 app[web.1]: at Object.Module._extensions..js (module.js:432:10)
2015-12-23T02:34:10.543990+00:00 app[web.1]: at Module.load (module.js:356:32)
2015-12-23T02:34:10.543990+00:00 app[web.1]: at Function.Module._load (module.js:313:12)
2015-12-23T02:34:10.543991+00:00 app[web.1]: at Function.Module.runMain (module.js:457:10)
2015-12-23T02:34:10.543992+00:00 app[web.1]: at startup (node.js:138:18)
2015-12-23T02:34:10.544003+00:00 app[web.1]: at node.js:974:3
2015-12-23T02:34:11.273463+00:00 heroku[web.1]: State changed from starting to crashed
2015-12-23T02:34:11.274404+00:00 heroku[web.1]: State changed from crashed to starting
2015-12-23T02:34:11.249687+00:00 heroku[web.1]: Process exited with status 1
2015-12-23T02:34:12.195648+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2015-12-23T02:34:12.163995+00:00 heroku[web.1]: Starting process with command `node index.js`
2015-12-23T02:34:14.005248+00:00 heroku[web.1]: Process exited with status 143
2015-12-23T02:34:14.208032+00:00 app[web.1]: /app/node_modules/express/lib/application.js:209
2015-12-23T02:34:14.208060+00:00 app[web.1]: throw new TypeError('app.use() requires middleware functions');
2015-12-23T02:34:14.208062+00:00 app[web.1]: ^
2015-12-23T02:34:14.208063+00:00 app[web.1]:
2015-12-23T02:34:14.208067+00:00 app[web.1]: TypeError: app.use() requires middleware functions
2015-12-23T02:34:14.208068+00:00 app[web.1]: at EventEmitter.use (/app/node_modules/express/lib/application.js:209:11)
2015-12-23T02:34:14.208069+00:00 app[web.1]: at Object.<anonymous> (/app/index.js:8:5)
2015-12-23T02:34:14.208069+00:00 app[web.1]: at Module._compile (module.js:425:26)
2015-12-23T02:34:14.208070+00:00 app[web.1]: at Object.Module._extensions..js (module.js:432:10)
2015-12-23T02:34:14.208070+00:00 app[web.1]: at Module.load (module.js:356:32)
2015-12-23T02:34:14.208071+00:00 app[web.1]: at Function.Module._load (module.js:313:12)
2015-12-23T02:34:14.208071+00:00 app[web.1]: at Function.Module.runMain (module.js:457:10)
2015-12-23T02:34:14.208072+00:00 app[web.1]: at startup (node.js:138:18)
2015-12-23T02:34:14.208073+00:00 app[web.1]: at node.js:974:3
2015-12-23T02:34:14.997397+00:00 heroku[web.1]: Process exited with status 1
2015-12-23T02:34:16.318032+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=allert.herokuapp.com request_id=21b5b175-c8c3-4338-b1ff-073c55ff4dac fwd="142.113.215.26" dyno= connect= service= status=503 bytes=
2015-12-23T02:34:15.054571+00:00 heroku[web.1]: State changed from starting to crashed
2015-12-23T02:34:46.713402+00:00 heroku[slug-compiler]: Slug compilation started
2015-12-23T02:34:46.713411+00:00 heroku[slug-compiler]: Slug compilation finished
2015-12-23T02:34:46.577987+00:00 heroku[api]: Deploy c6fd6f1 by averybentz#bell.net
2015-12-23T02:34:46.577987+00:00 heroku[api]: Release v176 created by averybentz#bell.net
2015-12-23T02:34:46.701946+00:00 heroku[web.1]: State changed from crashed to starting
2015-12-23T02:34:47.557807+00:00 heroku[web.1]: Starting process with command `node index.js`
2015-12-23T02:34:50.042760+00:00 heroku[web.1]: State changed from starting to up
2015-12-23T03:07:57.567678+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2015-12-23T03:07:59.713608+00:00 heroku[web.1]: Process exited with status 143
2015-12-23T03:07:53.346047+00:00 heroku[web.1]: Idling
2015-12-23T03:07:53.346422+00:00 heroku[web.1]: State changed from up to down
2015-12-23T16:22:11.989654+00:00 heroku[api]: Starting process with command `rake db:migrate` by averybentz#bell.net
2015-12-23T16:22:13.750043+00:00 heroku[run.2637]: Starting process with command `rake db:migrate`
2015-12-23T16:22:13.713201+00:00 heroku[run.2637]: Awaiting client
2015-12-23T16:22:14.013741+00:00 heroku[run.2637]: State changed from starting to up
2015-12-23T16:22:16.241635+00:00 heroku[run.2637]: State changed from up to complete
2015-12-23T16:22:16.224832+00:00 heroku[run.2637]: Process exited with status 127
2015-12-23T16:23:12.741395+00:00 heroku[api]: Starting process with command `rake db:migrate` by averybentz#bell.net
2015-12-23T16:23:13.915645+00:00 heroku[run.8207]: Awaiting client
2015-12-23T16:23:13.936338+00:00 heroku[run.8207]: Starting process with command `rake db:migrate`
2015-12-23T16:23:14.252137+00:00 heroku[run.8207]: State changed from starting to up
2015-12-23T16:23:15.489691+00:00 heroku[run.8207]: Process exited with status 127
2015-12-23T16:23:15.526095+00:00 heroku[run.8207]: State changed from up to complete
2015-12-23T16:27:33.180438+00:00 heroku[api]: Deploy f63f788 by averybentz#bell.net
2015-12-23T16:27:33.180438+00:00 heroku[api]: Release v177 created by averybentz#bell.net
2015-12-23T16:27:33.322549+00:00 heroku[slug-compiler]: Slug compilation started
2015-12-23T16:27:33.322560+00:00 heroku[slug-compiler]: Slug compilation finished
2015-12-23T20:34:47.337524+00:00 heroku[api]: Deploy fc8a2a6 by averybentz#bell.net
2015-12-23T20:34:47.337524+00:00 heroku[api]: Release v178 created by averybentz#bell.net
2015-12-23T20:34:47.477567+00:00 heroku[slug-compiler]: Slug compilation started
2015-12-23T20:34:47.477591+00:00 heroku[slug-compiler]: Slug compilation finished
2015-12-23T20:34:56.089225+00:00 heroku[web.1]: Starting process with command `node index.js`
2015-12-23T20:34:55.197826+00:00 heroku[web.1]: Unidling
2015-12-23T20:34:55.198252+00:00 heroku[web.1]: State changed from down to starting
2015-12-23T20:34:58.238986+00:00 heroku[web.1]: State changed from starting to up
2015-12-23T20:34:59.290400+00:00 heroku[router]: at=info method=GET path="/" host=allert.herokuapp.com request_id=3c539404-e0bc-4878-b856-ccfaea4559d6 fwd="142.113.215.26" dyno=web.1 connect=2ms service=22ms status=200 bytes=1892
2015-12-23T20:34:59.370781+00:00 heroku[router]: at=info method=GET path="/placeholder.js" host=allert.herokuapp.com request_id=24115a3e-f28f-46b3-b49d-2dd75ff4ea80 fwd="142.113.215.26" dyno=web.1 connect=4ms service=7ms status=404 bytes=225
2015-12-23T20:34:59.352933+00:00 heroku[router]: at=info method=GET path="/style.css" host=allert.herokuapp.com request_id=8635dc7c-8dab-4518-9d93-c108a5a7274f fwd="142.113.215.26" dyno=web.1 connect=2ms service=7ms status=404 bytes=220
2015-12-23T20:35:06.061489+00:00 heroku[router]: at=info method=GET path="/placeholder.js" host=allert.herokuapp.com request_id=b2e00361-7561-4a5d-86c3-bfbd445c1195 fwd="142.113.215.26" dyno=web.1 connect=2ms service=2ms status=404 bytes=225
2015-12-23T20:35:06.073592+00:00 heroku[router]: at=info method=GET path="/style.css" host=allert.herokuapp.com request_id=77220e8e-d7f3-486b-8240-122ff34d28d5 fwd="142.113.215.26" dyno=web.1 connect=2ms service=3ms status=404 bytes=220
2015-12-23T20:35:06.026126+00:00 heroku[router]: at=info method=GET path="/?username=&password=" host=allert.herokuapp.com request_id=a0d0909c-1dd8-4d5f-985b-23c8d15eb972 fwd="142.113.215.26" dyno=web.1 connect=16ms service=8ms status=200 bytes=1892
2015-12-23T20:35:06.671874+00:00 heroku[router]: at=info method=GET path="/placeholder.js" host=allert.herokuapp.com request_id=d44efef6-7ed5-4fa5-b9cb-5be321054272 fwd="142.113.215.26" dyno=web.1 connect=5ms service=4ms status=404 bytes=225
2015-12-23T20:35:06.603304+00:00 heroku[router]: at=info method=GET path="/?username=&password=" host=allert.herokuapp.com request_id=e048945d-f7cc-4737-bc15-54ff205e7a27 fwd="142.113.215.26" dyno=web.1 connect=2ms service=4ms status=304 bytes=146
2015-12-23T20:35:06.649798+00:00 heroku[router]: at=info method=GET path="/style.css" host=allert.herokuapp.com request_id=ecfbf3d9-e6d4-41e6-a98b-60a4bb42d1a0 fwd="142.113.215.26" dyno=web.1 connect=2ms service=5ms status=404 bytes=220
2015-12-23T20:35:07.283559+00:00 heroku[router]: at=info method=GET path="/?username=&password=" host=allert.herokuapp.com request_id=f786f940-c163-45a0-87f1-2e40681d1a44 fwd="142.113.215.26" dyno=web.1 connect=2ms service=3ms status=304 bytes=146
2015-12-23T20:35:07.336974+00:00 heroku[router]: at=info method=GET path="/style.css" host=allert.herokuapp.com request_id=7fd25be7-7030-4f7b-a974-410185d5ed36 fwd="142.113.215.26" dyno=web.1 connect=11ms service=3ms status=404 bytes=220
2015-12-23T20:35:07.314908+00:00 heroku[router]: at=info method=GET path="/placeholder.js" host=allert.herokuapp.com request_id=a522768d-5171-4300-a435-c6669326015b fwd="142.113.215.26" dyno=web.1 connect=2ms service=2ms status=404 bytes=225
I am assuming that Heroku has some security against src files or something along those lines. Any help would be appreciated. Thanks in advance.
Your app has a bug here:
2015-12-23T02:34:14.208032+00:00 app[web.1]: /app/node_modules/express/lib/application.js:209
2015-12-23T02:34:14.208060+00:00 app[web.1]: throw new TypeError('app.use() requires middleware functions');
2015-12-23T02:34:14.208062+00:00 app[web.1]: ^
2015-12-23T02:34:14.208063+00:00 app[web.1]:
2015-12-23T02:34:14.208067+00:00 app[web.1]: TypeError: app.use() requires middleware functions
2015-12-23T02:34:14.208068+00:00 app[web.1]: at EventEmitter.use (/app/node_modules/express/lib/application.js:209:11)
2015-12-23T02:34:14.208069+00:00 app[web.1]: at Object.<anonymous> (/app/index.js:8:5)
2015-12-23T02:34:14.208069+00:00 app[web.1]: at Module._compile (module.js:425:26)
2015-12-23T02:34:14.208070+00:00 app[web.1]: at Object.Module._extensions..js (module.js:432:10)
2015-12-23T02:34:14.208070+00:00 app[web.1]: at Module.load (module.js:356:32)
2015-12-23T02:34:14.208071+00:00 app[web.1]: at Function.Module._load (module.js:313:12)
2015-12-23T02:34:14.208071+00:00 app[web.1]: at Function.Module.runMain (module.js:457:10)
2015-12-23T02:34:14.208072+00:00 app[web.1]: at startup (node.js:138:18)
2015-12-23T02:34:14.208073+00:00 app[web.1]: at node.js:974:3
2015-12-23T02:34:14.997397+00:00 heroku[web.1]: Process exited with status 1
2015-12-23T02:34:16.318032+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=allert.herokuapp.com request_id=21b5b175-c8c3-4338-b1ff-073c55ff4dac fwd="142.113.215.26" dyno= connect= service= status=503 bytes=
2015-12-23T02:34:15.054571+00:00 heroku[web.1]: State changed from starting to crashed
Check line 8 of your index.js file. It's passing something to express that express doesn't understand.
Heroku doesn't display static files. I hosted them on Amazon S3 and the site is now working.
Related
I have created an app that upload some files and than send me object like that
{"name":"MEHMET SAYIN CV - 10_2021.pdf","type":"application/pdf","size":99771}
I used multer to handle uploading files. When I upload it to heroku I failed.I want to share the logs related.
2021-10-15T15:51:02.457409+00:00 app[api]: Deploy 6e984f86 by user sayinmehmet47#gmail.com
2021-10-15T15:51:02.457409+00:00 app[api]: Release v11 created by user sayinmehmet47#gmail.com
2021-10-15T15:51:03.599539+00:00 heroku[web.1]: State changed from crashed to starting
2021-10-15T15:51:05.000000+00:00 app[api]: Build succeeded
2021-10-15T15:51:05.698098+00:00 heroku[web.1]: Starting process with command `npm start`
2021-10-15T15:51:06.737506+00:00 app[web.1]:
2021-10-15T15:51:06.737526+00:00 app[web.1]: > file_metadata#0.0.1 start /app
2021-10-15T15:51:06.737527+00:00 app[web.1]: > node server.js
2021-10-15T15:51:06.737527+00:00 app[web.1]:
2021-10-15T15:51:07.036041+00:00 app[web.1]: connected
2021-10-15T15:51:07.068246+00:00 app[web.1]: /app/node_modules/mkdirp/index.js:91
2021-10-15T15:51:07.068247+00:00 app[web.1]: throw err0;
2021-10-15T15:51:07.068248+00:00 app[web.1]: ^
2021-10-15T15:51:07.068248+00:00 app[web.1]:
2021-10-15T15:51:07.068248+00:00 app[web.1]: Error: EROFS: read-only file system, mkdir '/public'
2021-10-15T15:51:07.068249+00:00 app[web.1]: at Object.mkdirSync (fs.js:1013:3)
2021-10-15T15:51:07.068249+00:00 app[web.1]: at sync (/app/node_modules/mkdirp/index.js:72:13)
2021-10-15T15:51:07.068250+00:00 app[web.1]: at sync (/app/node_modules/mkdirp/index.js:78:24)
2021-10-15T15:51:07.068250+00:00 app[web.1]: at Function.sync (/app/node_modules/mkdirp/index.js:78:24)
2021-10-15T15:51:07.068250+00:00 app[web.1]: at new DiskStorage (/app/node_modules/multer/storage/disk.js:21:12)
2021-10-15T15:51:07.068251+00:00 app[web.1]: at module.exports (/app/node_modules/multer/storage/disk.js:65:10)
2021-10-15T15:51:07.068251+00:00 app[web.1]: at new Multer (/app/node_modules/multer/index.js:15:20)
2021-10-15T15:51:07.068252+00:00 app[web.1]: at multer (/app/node_modules/multer/index.js:95:12)
2021-10-15T15:51:07.068252+00:00 app[web.1]: at Object.<anonymous> (/app/api/files.js:4:16)
2021-10-15T15:51:07.068252+00:00 app[web.1]: at Module._compile (internal/modules/cjs/loader.js:1085:14) {
2021-10-15T15:51:07.068253+00:00 app[web.1]: errno: -30,
2021-10-15T15:51:07.068253+00:00 app[web.1]: syscall: 'mkdir',
2021-10-15T15:51:07.068253+00:00 app[web.1]: code: 'EROFS',
2021-10-15T15:51:07.068254+00:00 app[web.1]: path: '/public'
2021-10-15T15:51:07.068254+00:00 app[web.1]: }
2021-10-15T15:51:07.079497+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2021-10-15T15:51:07.079732+00:00 app[web.1]: npm ERR! errno 1
2021-10-15T15:51:07.083831+00:00 app[web.1]: npm ERR! file_metadata#0.0.1 start: `node server.js`
2021-10-15T15:51:07.083871+00:00 app[web.1]: npm ERR! Exit status 1
2021-10-15T15:51:07.083924+00:00 app[web.1]: npm ERR!
2021-10-15T15:51:07.083988+00:00 app[web.1]: npm ERR! Failed at the file_metadata#0.0.1 start script.
2021-10-15T15:51:07.083989+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2021-10-15T15:51:07.089384+00:00 app[web.1]:
2021-10-15T15:51:07.089446+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2021-10-15T15:51:07.089472+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2021-10-15T15_51_07_084Z-debug.log
2021-10-15T15:51:07.196350+00:00 heroku[web.1]: Process exited with status 1
2021-10-15T15:51:07.347289+00:00 heroku[web.1]: State changed from starting to crashed
2021-10-15T15:51:12.784398+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=filedownl12.herokuapp.com request_id=fe098106-1546-4b7c-9b8c-fefe790dfae7 fwd="77.49.34.161" dyno= connect= service= status=503 bytes= protocol=https
2021-10-15T15:51:13.747221+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=filedownl12.herokuapp.com request_id=8173d073-97c1-45e1-afab-c3b2da397e12 fwd="77.49.34.161" dyno= connect= service= status=503 bytes= protocol=https
2021-10-15T16:04:45.000000+00:00 app[api]: Build started by user sayinmehmet47#gmail.com
2021-10-15T16:05:21.465576+00:00 app[api]: Deploy 1f51e389 by user sayinmehmet47#gmail.com
2021-10-15T16:05:21.465576+00:00 app[api]: Release v12 created by user sayinmehmet47#gmail.com
2021-10-15T16:05:23.278268+00:00 heroku[web.1]: State changed from crashed to starting
2021-10-15T16:05:24.000000+00:00 app[api]: Build succeeded
2021-10-15T16:05:26.141343+00:00 heroku[web.1]: Starting process with command `node ./server.js`
2021-10-15T16:05:27.754473+00:00 app[web.1]: connected
2021-10-15T16:05:27.819924+00:00 app[web.1]: /app/node_modules/mkdirp/index.js:91
2021-10-15T16:05:27.819926+00:00 app[web.1]: throw err0;
2021-10-15T16:05:27.819926+00:00 app[web.1]: ^
2021-10-15T16:05:27.819927+00:00 app[web.1]:
2021-10-15T16:05:27.819927+00:00 app[web.1]: Error: EROFS: read-only file system, mkdir '/public'
2021-10-15T16:05:27.819928+00:00 app[web.1]: at Object.mkdirSync (fs.js:1013:3)
2021-10-15T16:05:27.819928+00:00 app[web.1]: at sync (/app/node_modules/mkdirp/index.js:72:13)
2021-10-15T16:05:27.819928+00:00 app[web.1]: at sync (/app/node_modules/mkdirp/index.js:78:24)
2021-10-15T16:05:27.819929+00:00 app[web.1]: at Function.sync (/app/node_modules/mkdirp/index.js:78:24)
2021-10-15T16:05:27.819929+00:00 app[web.1]: at new DiskStorage (/app/node_modules/multer/storage/disk.js:21:12)
2021-10-15T16:05:27.819930+00:00 app[web.1]: at module.exports (/app/node_modules/multer/storage/disk.js:65:10)
2021-10-15T16:05:27.819930+00:00 app[web.1]: at new Multer (/app/node_modules/multer/index.js:15:20)
2021-10-15T16:05:27.819931+00:00 app[web.1]: at multer (/app/node_modules/multer/index.js:95:12)
2021-10-15T16:05:27.819931+00:00 app[web.1]: at Object.<anonymous> (/app/api/files.js:4:16)
2021-10-15T16:05:27.819931+00:00 app[web.1]: at Module._compile (internal/modules/cjs/loader.js:1085:14) {
2021-10-15T16:05:27.819932+00:00 app[web.1]: errno: -30,
2021-10-15T16:05:27.819932+00:00 app[web.1]: syscall: 'mkdir',
2021-10-15T16:05:27.819932+00:00 app[web.1]: code: 'EROFS',
2021-10-15T16:05:27.819933+00:00 app[web.1]: path: '/public'
2021-10-15T16:05:27.819933+00:00 app[web.1]: }
2021-10-15T16:05:27.968565+00:00 heroku[web.1]: Process exited with status 1
2021-10-15T16:05:28.098649+00:00 heroku[web.1]: State changed from starting to crashed
2021-10-15T16:05:28.136896+00:00 heroku[web.1]: State changed from crashed to starting
2021-10-15T16:05:30.375434+00:00 heroku[web.1]: Starting process with command `node ./server.js`
2021-10-15T16:05:32.063799+00:00 app[web.1]: connected
2021-10-15T16:05:32.108031+00:00 app[web.1]: /app/node_modules/mkdirp/index.js:91
2021-10-15T16:05:32.108033+00:00 app[web.1]: throw err0;
2021-10-15T16:05:32.108033+00:00 app[web.1]: ^
2021-10-15T16:05:32.108033+00:00 app[web.1]:
2021-10-15T16:05:32.108034+00:00 app[web.1]: Error: EROFS: read-only file system, mkdir '/public'
2021-10-15T16:05:32.108034+00:00 app[web.1]: at Object.mkdirSync (fs.js:1013:3)
2021-10-15T16:05:32.108035+00:00 app[web.1]: at sync (/app/node_modules/mkdirp/index.js:72:13)
2021-10-15T16:05:32.108035+00:00 app[web.1]: at sync (/app/node_modules/mkdirp/index.js:78:24)
2021-10-15T16:05:32.108035+00:00 app[web.1]: at Function.sync (/app/node_modules/mkdirp/index.js:78:24)
2021-10-15T16:05:32.108036+00:00 app[web.1]: at new DiskStorage (/app/node_modules/multer/storage/disk.js:21:12)
2021-10-15T16:05:32.108036+00:00 app[web.1]: at module.exports (/app/node_modules/multer/storage/disk.js:65:10)
2021-10-15T16:05:32.108036+00:00 app[web.1]: at new Multer (/app/node_modules/multer/index.js:15:20)
2021-10-15T16:05:32.108037+00:00 app[web.1]: at multer (/app/node_modules/multer/index.js:95:12)
2021-10-15T16:05:32.108037+00:00 app[web.1]: at Object.<anonymous> (/app/api/files.js:4:16)
2021-10-15T16:05:32.108037+00:00 app[web.1]: at Module._compile (internal/modules/cjs/loader.js:1085:14) {
2021-10-15T16:05:32.108038+00:00 app[web.1]: errno: -30,
2021-10-15T16:05:32.108041+00:00 app[web.1]: syscall: 'mkdir',
2021-10-15T16:05:32.108041+00:00 app[web.1]: code: 'EROFS',
2021-10-15T16:05:32.108041+00:00 app[web.1]: path: '/public'
2021-10-15T16:05:32.108041+00:00 app[web.1]: }
2021-10-15T16:05:32.267952+00:00 heroku[web.1]: Process exited with status 1
2021-10-15T16:05:32.695933+00:00 heroku[web.1]: State changed from starting to crashed
2021-10-15T16:05:33.707024+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=filedownl12.herokuapp.com request_id=c9fdfd08-1b36-450e-a4de-fb65785677a4 fwd="77.49.34.161" dyno= connect= service= status=503 bytes= protocol=https
2021-10-15T16:05:34.925481+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=filedownl12.herokuapp.com request_id=3aca34c2-47e0-4f99-9884-13b91ed25f99 fwd="77.49.34.161" dyno= connect= service= status=503 bytes= protocol=https
2021-10-15T16:13:09.486503+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=filedownl12.herokuapp.com request_id=e41ba396-2172-4804-a573-0fafc1a2c47b fwd="77.49.34.161" dyno= connect= service= status=503 bytes= protocol=https
2021-10-15T16:13:10.694600+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=filedownl12.herokuapp.com request_id=4ef46b32-012c-43b2-8342-0a0637d5a29b fwd="77.49.34.161" dyno= connect= service= status=503 bytes= protocol=https
I also tried to be sure if I set the variables for MONGO_URI,I also set them. Also I created a procfile and write inside it
web: node ./server.js
But it didnt works. I lastly want to share my directories picture.
I am trying to deploy a web app on Heroku and it keeps crashing.
After checking the logs, it says it crashed right before starting process with command 'node app.js'
After pushing my app to Heroku Git, I clicked on the link and it gave me a missing script: start.
I added "start": "index.js" to my scripts, replacing the test and return 1 string.
Now, I'm getting a different application error.
Here are the logs:
2019-04-16T15:55:19.291517+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2019-04-16T15_55_19_283Z-debug.log
2019-04-16T15:55:22.076257+00:00 heroku[web.1]: Starting process with command `npm start`
2019-04-16T15:55:24.008573+00:00 heroku[web.1]: Process exited with status 1
2019-04-16T15:55:24.034855+00:00 heroku[web.1]: State changed from starting to crashed
2019-04-16T15:55:23.952515+00:00 app[web.1]: npm ERR! missing script: start
2019-04-16T15:55:23.958426+00:00 app[web.1]:
2019-04-16T15:55:23.958664+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2019-04-16T15:55:23.958754+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2019-04-16T15_55_23_953Z-debug.log
2019-04-16T16:19:04.974643+00:00 heroku[web.1]: State changed from crashed to starting
2019-04-16T16:19:08.471350+00:00 heroku[web.1]: Starting process with command `npm start`
2019-04-16T16:19:10.946953+00:00 heroku[web.1]: State changed from starting to crashed
2019-04-16T16:19:10.920954+00:00 heroku[web.1]: Process exited with status 1
2019-04-16T16:19:10.847576+00:00 app[web.1]: npm ERR! missing script: start
2019-04-16T16:19:10.856940+00:00 app[web.1]:
2019-04-16T16:19:10.862276+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2019-04-16T16:19:10.862279+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2019-04-16T16_19_10_849Z-debug.log
2019-04-16T16:21:52.000000+00:00 app[api]: Build started by user bsautry#ualr.edu
2019-04-16T16:22:14.048093+00:00 heroku[web.1]: State changed from crashed to starting
2019-04-16T16:22:13.644927+00:00 app[api]: Release v4 created by user bsautry#ualr.edu
2019-04-16T16:22:13.644927+00:00 app[api]: Deploy 69b62110 by user bsautry#ualr.edu
2019-04-16T16:22:17.615771+00:00 heroku[web.1]: Starting process with command `node app.js`
2019-04-16T16:22:18.000000+00:00 app[api]: Build succeeded
2019-04-16T16:22:20.049173+00:00 heroku[web.1]: Process exited with status 1
2019-04-16T16:22:20.067122+00:00 heroku[web.1]: State changed from starting to crashed
2019-04-16T16:22:19.975525+00:00 app[web.1]: internal/modules/cjs/loader.js:584
2019-04-16T16:22:19.975544+00:00 app[web.1]: throw err;
2019-04-16T16:22:19.975546+00:00 app[web.1]: ^
2019-04-16T16:22:19.975548+00:00 app[web.1]:
2019-04-16T16:22:19.975549+00:00 app[web.1]: Error: Cannot find module '/app/app.js'
2019-04-16T16:22:19.975551+00:00 app[web.1]: at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15)
2019-04-16T16:22:19.975553+00:00 app[web.1]: at Function.Module._load (internal/modules/cjs/loader.js:508:25)
2019-04-16T16:22:19.975555+00:00 app[web.1]: at Function.Module.runMain (internal/modules/cjs/loader.js:754:12)
2019-04-16T16:22:19.975557+00:00 app[web.1]: at startup (internal/bootstrap/node.js:283:19)
2019-04-16T16:22:19.975559+00:00 app[web.1]: at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
2019-04-16T16:25:54.162474+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=loveplumbing.herokuapp.com request_id=589c1650-a614-4aae-a8e5-ffb58a523e1e fwd="99.34.148.220" dyno= connect= service= status=503 bytes= protocol=https
2019-04-16T16:25:54.759301+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=loveplumbing.herokuapp.com request_id=3c7f8d06-e415-48ae-952d-3968d12db75c fwd="99.34.148.220" dyno= connect= service= status=503 bytes= protocol=https
2019-04-16T16:30:55.410784+00:00 heroku[web.1]: State changed from crashed to starting
2019-04-16T16:30:58.687945+00:00 heroku[web.1]: Starting process with command `node app.js`
2019-04-16T16:31:01.064389+00:00 heroku[web.1]: State changed from starting to crashed
2019-04-16T16:31:00.983841+00:00 app[web.1]: internal/modules/cjs/loader.js:584
2019-04-16T16:31:00.983863+00:00 app[web.1]: throw err;
2019-04-16T16:31:00.983865+00:00 app[web.1]: ^
2019-04-16T16:31:00.983866+00:00 app[web.1]:
2019-04-16T16:31:00.983868+00:00 app[web.1]: Error: Cannot find module '/app/app.js'
2019-04-16T16:31:00.983870+00:00 app[web.1]: at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15)
2019-04-16T16:31:00.983872+00:00 app[web.1]: at Function.Module._load (internal/modules/cjs/loader.js:508:25)
2019-04-16T16:31:00.983873+00:00 app[web.1]: at Function.Module.runMain (internal/modules/cjs/loader.js:754:12)
2019-04-16T16:31:00.983874+00:00 app[web.1]: at startup (internal/bootstrap/node.js:283:19)
2019-04-16T16:31:00.983875+00:00 app[web.1]: at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
2019-04-16T16:31:01.040784+00:00 heroku[web.1]: Process exited with status 1
2019-04-16T16:59:14.705641+00:00 heroku[web.1]: State changed from crashed to starting
2019-04-16T16:59:18.023601+00:00 heroku[web.1]: Starting process with command `node app.js`
2019-04-16T16:59:20.925080+00:00 heroku[web.1]: State changed from starting to crashed
2019-04-16T16:59:20.905853+00:00 heroku[web.1]: Process exited with status 1
2019-04-16T16:59:20.804107+00:00 app[web.1]: internal/modules/cjs/loader.js:584
2019-04-16T16:59:20.804145+00:00 app[web.1]: throw err;
2019-04-16T16:59:20.804147+00:00 app[web.1]: ^
2019-04-16T16:59:20.804149+00:00 app[web.1]:
2019-04-16T16:59:20.804150+00:00 app[web.1]: Error: Cannot find module '/app/app.js'
2019-04-16T16:59:20.804153+00:00 app[web.1]: at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15)
2019-04-16T16:59:20.804155+00:00 app[web.1]: at Function.Module._load (internal/modules/cjs/loader.js:508:25)
2019-04-16T16:59:20.804156+00:00 app[web.1]: at Function.Module.runMain (internal/modules/cjs/loader.js:754:12)
2019-04-16T16:59:20.804158+00:00 app[web.1]: at startup (internal/bootstrap/node.js:283:19)
2019-04-16T16:59:20.804159+00:00 app[web.1]: at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
2019-04-16T17:37:18.987655+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=loveplumbing.herokuapp.com request_id=1fc71b49-e1f4-4e23-b898-9d77035b5e04 fwd="99.34.148.220" dyno= connect= service= status=503 bytes= protocol=https
2019-04-16T17:37:19.514237+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=loveplumbing.herokuapp.com request_id=a9886709-5ec0-49da-adfd-0c02d8378903 fwd="99.34.148.220" dyno= connect= service= status=503 bytes= protocol=https
2019-04-16T17:45:46.000000+00:00 app[api]: Build started by user bsautry#ualr.edu
2019-04-16T17:46:08.863208+00:00 heroku[web.1]: State changed from crashed to starting
2019-04-16T17:46:08.459037+00:00 app[api]: Release v5 created by user bsautry#ualr.edu
2019-04-16T17:46:08.459037+00:00 app[api]: Deploy 9cfd1de3 by user bsautry#ualr.edu
2019-04-16T17:46:12.241604+00:00 heroku[web.1]: Starting process with command `node app.js`
2019-04-16T17:46:13.000000+00:00 app[api]: Build succeeded
2019-04-16T17:46:14.898819+00:00 heroku[web.1]: State changed from starting to crashed
2019-04-16T17:46:14.914929+00:00 heroku[web.1]: State changed from crashed to starting
2019-04-16T17:46:14.882816+00:00 heroku[web.1]: Process exited with status 1
2019-04-16T17:46:14.816039+00:00 app[web.1]: internal/modules/cjs/loader.js:584
2019-04-16T17:46:14.816072+00:00 app[web.1]: throw err;
2019-04-16T17:46:14.816074+00:00 app[web.1]: ^
2019-04-16T17:46:14.816076+00:00 app[web.1]:
2019-04-16T17:46:14.816078+00:00 app[web.1]: Error: Cannot find module '/app/app.js'
2019-04-16T17:46:14.816080+00:00 app[web.1]: at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15)
2019-04-16T17:46:14.816081+00:00 app[web.1]: at Function.Module._load (internal/modules/cjs/loader.js:508:25)
2019-04-16T17:46:14.816083+00:00 app[web.1]: at Function.Module.runMain (internal/modules/cjs/loader.js:754:12)
2019-04-16T17:46:14.816084+00:00 app[web.1]: at startup (internal/bootstrap/node.js:283:19)
2019-04-16T17:46:14.816086+00:00 app[web.1]: at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
2019-04-16T17:46:19.195129+00:00 heroku[web.1]: Starting process with command `node app.js`
2019-04-16T17:46:22.064061+00:00 heroku[web.1]: State changed from starting to crashed
2019-04-16T17:46:22.040652+00:00 heroku[web.1]: Process exited with status 1
2019-04-16T17:46:21.962948+00:00 app[web.1]: internal/modules/cjs/loader.js:584
2019-04-16T17:46:21.962978+00:00 app[web.1]: throw err;
2019-04-16T17:46:21.962980+00:00 app[web.1]: ^
2019-04-16T17:46:21.962981+00:00 app[web.1]:
2019-04-16T17:46:21.962983+00:00 app[web.1]: Error: Cannot find module '/app/app.js'
2019-04-16T17:46:21.962985+00:00 app[web.1]: at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15)
2019-04-16T17:46:21.962987+00:00 app[web.1]: at Function.Module._load (internal/modules/cjs/loader.js:508:25)
2019-04-16T17:46:21.962989+00:00 app[web.1]: at Function.Module.runMain (internal/modules/cjs/loader.js:754:12)
2019-04-16T17:46:21.962991+00:00 app[web.1]: at startup (internal/bootstrap/node.js:283:19)
2019-04-16T17:46:21.962992+00:00 app[web.1]: at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
2019-04-16T17:46:22.320545+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=loveplumbing.herokuapp.com request_id=a8e86470-1fee-4159-a683-a4437e46ccbc fwd="99.34.148.220" dyno= connect= service= status=503 bytes= protocol=https
2019-04-16T17:46:23.689417+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=loveplumbing.herokuapp.com request_id=a7e1403a-3ee9-490f-9446-b4d8150761ee fwd="99.34.148.220" dyno= connect= service= status=503 bytes= protocol=https
2019-04-16T17:49:56.610263+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=loveplumbing.herokuapp.com request_id=fac4cd8f-dfce-4023-bc1d-e27e3297cd59 fwd="99.34.148.220" dyno= connect= service= status=503 bytes= protocol=https
2019-04-16T17:49:57.055698+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=loveplumbing.herokuapp.com request_id=b431c26e-62c1-42ca-908d-bbe70be171e4 fwd="99.34.148.220" dyno= connect= service= status=503 bytes= protocol=https
I expect it will be some sort of file naming issue.
Well, according to your error messages
Error: Cannot find module '/app/app.js'
I believe it is trying to find your app.js which is I guess it should be your index.js. What exactly are you using? Angular? If so, check this link as it helped me to understand how to set up an angular project to deploy to heroku.
https://medium.com/#hellotunmbi/how-to-deploy-angular-application-to-heroku-1d56e09c5147
I am deploying a simple node.js application. It seems to run fine locally (I see all the functionality I have written so far), but when I run:
heroku open cool
I just see a blank page.
Here are my logs:
2016-03-28T19:03:04.567334+00:00 heroku[web.1]: Idling
2016-03-28T19:03:04.568049+00:00 heroku[web.1]: State changed from up to down
2016-03-28T19:03:09.551701+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2016-03-28T19:03:11.228745+00:00 app[web.1]: Error waiting for process to terminate: No child processes
2016-03-28T19:03:12.390081+00:00 heroku[web.1]: Process exited with status 22
2016-03-28T21:08:49.503946+00:00 heroku[web.1]: Unidling
2016-03-28T21:08:49.504269+00:00 heroku[web.1]: State changed from down to starting
2016-03-28T21:08:51.391775+00:00 heroku[web.1]: Starting process with command `npm start`
2016-03-28T21:08:56.437135+00:00 app[web.1]:
2016-03-28T21:08:56.437149+00:00 app[web.1]: > transloc#1.0.0 start /app
2016-03-28T21:08:56.437150+00:00 app[web.1]: > node server.js
2016-03-28T21:08:56.437151+00:00 app[web.1]:
2016-03-28T21:08:57.152952+00:00 heroku[web.1]: State changed from starting to up
2016-03-28T21:08:58.586930+00:00 heroku[router]: at=info method=GET path="/cool" host=still-depths-35391.herokuapp.com request_id=6feab52c-143c-4353-bbbc-696355042cbc fwd="152.3.43.142" dyno=web.1 connect=1ms service=25ms status=200 bytes=1764
2016-03-28T21:08:58.910098+00:00 heroku[router]: at=info method=GET path="/server.js" host=still-depths-35391.herokuapp.com request_id=5c3ab4d4-0a5d-48fa-b272-7c82000da3dd fwd="152.3.43.142" dyno=web.1 connect=1ms service=7ms status=200 bytes=1764
2016-03-28T21:08:58.960943+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=still-depths-35391.herokuapp.com request_id=e7a35c05-da23-4a47-995e-98f015ea08ed fwd="152.3.43.142" dyno=web.1 connect=5ms service=7ms status=200 bytes=1764
I have a very simple app that works fine locally, but I am having problems on heroku. I'm unable to get the app deployed.
My main file is index.js. Any idea why I'm getting the npm ERR! argv?
I'm also getting a timeout request near the bottom, but I'm pretty sure that's because of the error at the top, but I can't find any information on how to fix that.
My Procfile:
web: node index.js
Heroku Logs
2016-01-04T03:13:40.069853+00:00 app[web.1]: at node.js:974:3
2016-01-04T03:13:40.098240+00:00 app[web.1]:
2016-01-04T03:13:40.116214+00:00 app[web.1]: npm ERR! argv "/app/.heroku/node/bin/node" "/app/.heroku/node/bin/npm" "start"
2016-01-04T03:13:40.116460+00:00 app[web.1]: npm ERR! node v5.1.1
2016-01-04T03:13:40.117293+00:00 app[web.1]: npm ERR! npm v3.3.12
2016-01-04T03:13:40.117565+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2016-01-04T03:13:40.117685+00:00 app[web.1]: npm ERR! 3-broadcast#1.0.0 start: `node index.js`
2016-01-04T03:13:40.117852+00:00 app[web.1]: npm ERR! Exit status 1
2016-01-04T03:13:40.118043+00:00 app[web.1]: npm ERR!
2016-01-04T03:13:40.118238+00:00 app[web.1]: npm ERR! Failed at the 3-broadcast#1.0.0 start script 'node index.js'.
2016-01-04T03:13:40.126696+00:00 app[web.1]: npm ERR! Make sure you have the latest version of node.js and npm installed.
2016-01-04T03:13:40.126957+00:00 app[web.1]: npm ERR! If you do, this is most likely a problem with the 3-broadcast package,
2016-01-04T03:13:40.127149+00:00 app[web.1]: npm ERR! not with npm itself.
2016-01-04T03:13:40.127352+00:00 app[web.1]: npm ERR! Tell the author that this fails on your system:
2016-01-04T03:13:40.127528+00:00 app[web.1]: npm ERR! node index.js
2016-01-04T03:13:40.127726+00:00 app[web.1]: npm ERR! You can get their info via:
2016-01-04T03:13:40.057500+00:00 app[web.1]: module.js:340
2016-01-04T03:13:40.127892+00:00 app[web.1]: npm ERR! npm owner ls 3-broadcast
2016-01-04T03:13:40.115774+00:00 app[web.1]: npm ERR! Linux 3.13.0-71-generic
2016-01-04T03:13:40.128057+00:00 app[web.1]: npm ERR! There is likely additional logging output above.
2016-01-04T03:13:40.142232+00:00 app[web.1]: npm ERR! Please include the following file with any support request:
2016-01-04T03:13:40.142468+00:00 app[web.1]: npm ERR! /app/npm-debug.log
2016-01-04T03:13:40.131714+00:00 app[web.1]:
2016-01-04T03:13:41.074138+00:00 heroku[web.1]: Process exited with status 1
2016-01-04T03:13:58.421558+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=blueredcircles.herokuapp.com request_id=e17561ec-a72c-4bda-a828-89d94b467eca fwd="67.202.159.95" dyno= connect= service= status=503 bytes=
2016-01-04T03:13:58.846066+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=blueredcircles.herokuapp.com request_id=f43b9355-785a-46c6-8b4b-d8242850eefa fwd="67.202.159.95" dyno= connect= service= status=503 bytes=
2016-01-04T03:13:41.079689+00:00 heroku[web.1]: State changed from starting to crashed
2016-01-04T03:13:34.108622+00:00 heroku[web.1]: State changed from crashed to starting
2016-01-04T03:16:03.635321+00:00 heroku[api]: Deploy b368561 by john.steven.curry#gmail.com
2016-01-04T03:16:03.635321+00:00 heroku[api]: Release v5 created by john.steven.curry#gmail.com
2016-01-04T03:16:03.859376+00:00 heroku[slug-compiler]: Slug compilation started
2016-01-04T03:16:03.859386+00:00 heroku[slug-compiler]: Slug compilation finished
2016-01-04T03:16:05.130278+00:00 heroku[web.1]: Starting process with command `npm start`
2016-01-04T03:16:07.541724+00:00 app[web.1]:
2016-01-04T03:16:07.541734+00:00 app[web.1]: > 3-broadcast#1.0.0 start /app
2016-01-04T03:16:07.541735+00:00 app[web.1]: > node server.js
2016-01-04T03:16:07.541736+00:00 app[web.1]:
2016-01-04T03:16:08.850108+00:00 heroku[web.1]: State changed from starting to up
2016-01-04T03:17:00.281412+00:00 heroku[router]: at=error code=H12 desc="Request timeout" method=GET path="/" host=blueredcircles.herokuapp.com request_id=51a122b3-29cf-4990-bdd3-87876aff7eb9 fwd="67.202.159.95" dyno=web.1 connect=0ms service=30000ms status=503 bytes=0
2016-01-04T03:17:34.578076+00:00 heroku[router]: at=error code=H12 desc="Request timeout" method=GET path="/favicon.ico" host=blueredcircles.herokuapp.com request_id=ea1ec7e0-9d21-4b75-a178-b1459c7f7b26 fwd="67.202.159.95" dyno=web.1 connect=0ms service=30008ms status=503 bytes=0
2016-01-04T03:19:02.419204+00:00 heroku[api]: Deploy 455f4b9 by john.steven.curry#gmail.com
2016-01-04T03:19:02.419204+00:00 heroku[api]: Release v6 created by john.steven.curry#gmail.com
2016-01-04T03:19:02.554096+00:00 heroku[slug-compiler]: Slug compilation started
2016-01-04T03:19:02.554106+00:00 heroku[slug-compiler]: Slug compilation finished
2016-01-04T03:19:02.521646+00:00 heroku[web.1]: State changed from up to starting
2016-01-04T03:19:03.765155+00:00 heroku[web.1]: Starting process with command `npm start`
2016-01-04T03:19:06.461660+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2016-01-04T03:19:06.859284+00:00 app[web.1]:
2016-01-04T03:19:06.859295+00:00 app[web.1]: > node server.js
2016-01-04T03:19:06.859293+00:00 app[web.1]: > 3-broadcast#1.0.0 start /app
2016-01-04T03:19:06.859295+00:00 app[web.1]:
2016-01-04T03:19:07.496859+00:00 heroku[web.1]: State changed from starting to up
2016-01-04T03:19:07.678179+00:00 app[web.1]: Error waiting for process to terminate: No child processes
2016-01-04T03:19:08.417595+00:00 heroku[web.1]: Process exited with status 22
2016-01-04T03:19:41.947257+00:00 heroku[router]: at=error code=H12 desc="Request timeout" method=GET path="/" host=blueredcircles.herokuapp.com request_id=9c09f36a-907f-46f8-987a-6643c4a8c812 fwd="67.202.159.95" dyno=web.1 connect=0ms service=30013ms status=503 bytes=0
2016-01-04T03:20:12.792172+00:00 heroku[router]: at=error code=H12 desc="Request timeout" method=GET path="/favicon.ico" host=blueredcircles.herokuapp.com request_id=13122c47-3da7-4225-8ecb-456e02300e98 fwd="67.202.159.95" dyno=web.1 connect=2ms service=30000ms status=503 bytes=0
2016-01-04T03:30:30.747148+00:00 heroku[router]: at=error code=H12 desc="Request timeout" method=GET path="/" host=blueredcircles.herokuapp.com request_id=173c5f06-e37f-4d58-851d-09a657bc6471 fwd="67.202.159.95" dyno=web.1 connect=0ms service=30000ms status=503 bytes=0
2016-01-04T03:31:01.607943+00:00 heroku[router]: at=error code=H12 desc="Request timeout" method=GET path="/favicon.ico" host=blueredcircles.herokuapp.com request_id=5a9b793c-33b7-4cbc-ba79-7d3fd03d6c9d fwd="67.202.159.95" dyno=web.1 connect=0ms service=30001ms status=503 bytes=0
2016-01-04T03:35:45.503236+00:00 heroku[router]: at=error code=H12 desc="Request timeout" method=GET path="/" host=blueredcircles.herokuapp.com request_id=0619c426-5b9f-4466-9149-23a25c9f2c9f fwd="67.202.159.95" dyno=web.1 connect=2ms service=30001ms status=503 bytes=0
2016-01-04T03:36:16.605008+00:00 heroku[router]: at=error code=H12 desc="Request timeout" method=GET path="/favicon.ico" host=blueredcircles.herokuapp.com request_id=7041b988-7754-4daf-b2cc-aa59d47af6a9 fwd="67.202.159.95" dyno=web.1 connect=1ms service=30000ms status=503 bytes=0
2016-01-04T03:51:14.197715+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2016-01-04T03:51:09.664826+00:00 heroku[web.1]: Idling
2016-01-04T03:51:09.665575+00:00 heroku[web.1]: State changed from up to down
2016-01-04T03:59:35.268346+00:00 heroku[api]: Deploy 76810f5 by john.steven.curry#gmail.com
2016-01-04T03:59:35.268417+00:00 heroku[api]: Release v7 created by john.steven.curry#gmail.com
2016-01-04T03:59:35.419230+00:00 heroku[slug-compiler]: Slug compilation started
2016-01-04T03:59:35.419242+00:00 heroku[slug-compiler]: Slug compilation finished
2016-01-04T03:59:43.936272+00:00 heroku[web.1]: Unidling
2016-01-04T03:59:43.936548+00:00 heroku[web.1]: State changed from down to starting
2016-01-04T03:59:45.379956+00:00 heroku[web.1]: Starting process with command `npm start`
2016-01-04T03:59:48.386628+00:00 app[web.1]:
2016-01-04T03:59:48.386638+00:00 app[web.1]: > 3-broadcast#1.0.0 start /app
2016-01-04T03:59:48.386639+00:00 app[web.1]: > node index.js
2016-01-04T03:59:48.386640+00:00 app[web.1]:
2016-01-04T04:00:21.016181+00:00 heroku[router]: at=error code=H12 desc="Request timeout" method=GET path="/" host=blueredcircles.herokuapp.com request_id=adb01525-d9ab-4218-aeb9-d83663fa5c44 fwd="67.202.159.95" dyno=web.1 connect=8ms service=30001ms status=503 bytes=0
2016-01-04T04:00:52.022088+00:00 heroku[router]: at=error code=H12 desc="Request timeout" method=GET path="/favicon.ico" host=blueredcircles.herokuapp.com request_id=644b6a2e-7f10-45ca-96d4-160ed0c57511 fwd="67.202.159.95" dyno=web.1 connect=2ms service=30000ms status=503 bytes=0
2016-01-04T04:12:47.063010+00:00 heroku[slug-compiler]: Slug compilation started
2016-01-04T04:12:47.063020+00:00 heroku[slug-compiler]: Slug compilation finished
2016-01-04T04:12:46.926357+00:00 heroku[api]: Deploy ac9051e by john.steven.curry#gmail.com
2016-01-04T04:12:46.926395+00:00 heroku[api]: Release v8 created by john.steven.curry#gmail.com
2016-01-04T04:12:48.336084+00:00 heroku[web.1]: Starting process with command `node index.js`
2016-01-04T04:12:52.744593+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2016-01-04T04:12:54.916240+00:00 heroku[web.1]: Process exited with status 143
2016-01-04T04:13:38.172796+00:00 heroku[router]: at=error code=H12 desc="Request timeout" method=GET path="/" host=blueredcircles.herokuapp.com request_id=e2a82fa4-2cde-41c8-9ced-f07b364bc5cf fwd="67.202.159.95" dyno=web.1 connect=2ms service=30000ms status=503 bytes=0
2016-01-04T04:14:09.018120+00:00 heroku[router]: at=error code=H12 desc="Request timeout" method=GET path="/favicon.ico" host=blueredcircles.herokuapp.com request_id=42ff0959-f6b2-40a7-bd91-e133440a7219 fwd="67.202.159.95" dyno=web.1 connect=1ms service=30007ms status=503 bytes=0
2016-01-04T04:22:13.685866+00:00 heroku[api]: Deploy cd095d8 by john.steven.curry#gmail.com
2016-01-04T04:22:13.685900+00:00 heroku[api]: Release v9 created by john.steven.curry#gmail.com
2016-01-04T04:22:13.818747+00:00 heroku[slug-compiler]: Slug compilation started
2016-01-04T04:22:13.818760+00:00 heroku[slug-compiler]: Slug compilation finished
2016-01-04T04:22:13.808044+00:00 heroku[web.1]: State changed from up to starting
2016-01-04T04:22:14.560498+00:00 heroku[web.1]: Starting process with command `node index.js`
2016-01-04T04:22:15.616097+00:00 heroku[web.1]: State changed from starting to up
2016-01-04T04:22:18.806289+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2016-01-04T04:22:21.385366+00:00 heroku[web.1]: Process exited with status 143
2016-01-04T04:27:40.534025+00:00 heroku[api]: Release v10 created by john.steven.curry#gmail.com
2016-01-04T04:27:40.533989+00:00 heroku[api]: Deploy 992d387 by john.steven.curry#gmail.com
2016-01-04T04:27:40.664281+00:00 heroku[slug-compiler]: Slug compilation started
2016-01-04T04:27:40.664290+00:00 heroku[slug-compiler]: Slug compilation finished
2016-01-04T04:27:41.813131+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2016-01-04T04:27:41.873956+00:00 heroku[web.1]: Starting process with command `node index.js`
2016-01-04T04:27:42.582874+00:00 heroku[web.1]: Process exited with status 143
index.js:
var app = require('http').createServer();
var io = require('socket.io')(app);
app.listen(process.env.PORT || 8000);
io.on('connection', function(socket) {
var alert = 'test hello from server :) ' + Math.random();
socket.on('change color', function(){
socket.broadcast.emit('change color');
});
socket.on('disconnect', function(){
console.log('1 client disconnected');
});
});
"engines": {
"node": "9.4.0",
"npm": "5.6.0"
}
Add these in your package.json file.
EDIT:
Your Heroku npm version should be compatible with your node version running on the device.
This app works fine in development locally but breaks in production. Heroku docs are not much help. Here are the logs. Any ideas? What other file would you need to see in order to gather required info?
2015-07-08T19:43:20.171096+00:00 heroku[slug-compiler]: Slug compilation started
2015-07-08T19:43:20.171178+00:00 heroku[slug-compiler]: Slug compilation finished
2015-07-08T19:43:20.122153+00:00 heroku[api]: Release v10 created by
2015-07-08T19:43:20.122153+00:00 heroku[api]: Deploy 6c5a2eb by
2015-07-08T19:43:20.229087+00:00 heroku[web.1]: State changed from up to starting
2015-07-08T19:43:22.728050+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2015-07-08T19:43:23.765850+00:00 heroku[web.1]: Starting process with command `./node_modules/.bin/forever -m 5 server.js`
2015-07-08T19:43:24.379905+00:00 heroku[web.1]: Process exited with status 143
2015-07-08T19:43:25.625194+00:00 app[web.1]: Recommending WEB_CONCURRENCY=1
2015-07-08T19:43:25.625166+00:00 app[web.1]: Detected 512 MB available memory, 512 MB limit per process (WEB_MEMORY)
2015-07-08T19:43:26.074341+00:00 app[web.1]: warn: --minUptime not set. Defaulting to: 1000ms
2015-07-08T19:43:26.198885+00:00 app[web.1]: Application loaded using the "production" environment configuration
2015-07-08T19:43:26.075391+00:00 app[web.1]: warn: --spinSleepTime not set. Your script will exit if it does not stay up for at least 1000ms
2015-07-08T19:43:26.217727+00:00 app[web.1]:
2015-07-08T19:43:26.217964+00:00 app[web.1]: assets: {
2015-07-08T19:43:26.217842+00:00 app[web.1]: /app/config/env/production.js:6
2015-07-08T19:43:26.221411+00:00 app[web.1]: at Object.Module._extensions..js (module.js:474:10)
2015-07-08T19:43:26.221413+00:00 app[web.1]: at Module.load (module.js:356:32)
2015-07-08T19:43:26.221415+00:00 app[web.1]: at Function.Module._load (module.js:312:12)
2015-07-08T19:43:26.221416+00:00 app[web.1]: at Module.require (module.js:364:17)
2015-07-08T19:43:26.221422+00:00 app[web.1]: at Object.Module._extensions..js (module.js:474:10)
2015-07-08T19:43:26.217966+00:00 app[web.1]: ^^^^^^
2015-07-08T19:43:26.221407+00:00 app[web.1]: SyntaxError: Unexpected identifier
2015-07-08T19:43:26.221419+00:00 app[web.1]: at Object.<anonymous> (/app/config/config.js:14:2)
2015-07-08T19:43:26.221417+00:00 app[web.1]: at require (module.js:380:17)
2015-07-08T19:43:26.221420+00:00 app[web.1]: at Module._compile (module.js:456:26)
2015-07-08T19:43:26.221410+00:00 app[web.1]: at Module._compile (module.js:439:25)
2015-07-08T19:43:26.227411+00:00 app[web.1]: error: Forever detected script exited with code: 8
2015-07-08T19:43:26.221423+00:00 app[web.1]: at Module.load (module.js:356:32)
2015-07-08T19:44:23.838412+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2015-07-08T19:44:23.838726+00:00 heroku[web.1]: Stopping process with SIGKILL
2015-07-08T19:44:24.855873+00:00 heroku[web.1]: Process exited with status 137
2015-07-08T19:44:24.868069+00:00 heroku[web.1]: State changed from starting to crashed
2015-07-08T19:44:24.869307+00:00 heroku[web.1]: State changed from crashed to starting
2015-07-08T19:44:28.879129+00:00 heroku[web.1]: Starting process with command `./node_modules/.bin/forever -m 5 server.js`
2015-07-08T19:44:31.286601+00:00 app[web.1]: Detected 512 MB available memory, 512 MB limit per process (WEB_MEMORY)
2015-07-08T19:44:31.286625+00:00 app[web.1]: Recommending WEB_CONCURRENCY=1
2015-07-08T19:44:32.195270+00:00 app[web.1]: warn: --minUptime not set. Defaulting to: 1000ms
2015-07-08T19:44:32.196656+00:00 app[web.1]: warn: --spinSleepTime not set. Your script will exit if it does not stay up for at least 1000ms
2015-07-08T19:44:32.527042+00:00 app[web.1]: Application loaded using the "production" environment configuration
2015-07-08T19:44:32.551018+00:00 app[web.1]: /app/config/env/production.js:6
2015-07-08T19:44:32.551021+00:00 app[web.1]: assets: {
2015-07-08T19:44:32.551022+00:00 app[web.1]: ^^^^^^
2015-07-08T19:44:32.557599+00:00 app[web.1]: SyntaxError: Unexpected identifier
2015-07-08T19:44:32.557603+00:00 app[web.1]: at Module._compile (module.js:439:25)
2015-07-08T19:44:32.557606+00:00 app[web.1]: at Module.load (module.js:356:32)
2015-07-08T19:44:32.557604+00:00 app[web.1]: at Object.Module._extensions..js (module.js:474:10)
2015-07-08T19:44:32.557607+00:00 app[web.1]: at Function.Module._load (module.js:312:12)
2015-07-08T19:44:32.557609+00:00 app[web.1]: at Module.require (module.js:364:17)
2015-07-08T19:44:32.557610+00:00 app[web.1]: at require (module.js:380:17)
2015-07-08T19:44:32.557612+00:00 app[web.1]: at Object.<anonymous> (/app/config/config.js:14:2)
2015-07-08T19:44:32.557613+00:00 app[web.1]: at Module._compile (module.js:456:26)
2015-07-08T19:44:32.557614+00:00 app[web.1]: at Object.Module._extensions..js (module.js:474:10)
2015-07-08T19:44:32.557616+00:00 app[web.1]: at Module.load (module.js:356:32)
2015-07-08T19:44:32.560998+00:00 app[web.1]: error: Forever detected script exited with code: 8
2015-07-08T19:44:32.550675+00:00 app[web.1]:
2015-07-08T19:45:18.337947+00:00 heroku[router]: at=error code=H20 desc="App boot timeout" method=GET path="/" host=docketing.herokuapp.com request_id=5ada4d19-6535-4e63-9d6b-1d74266f759a fwd="65.88.88.175" dyno= connect= service= status=503 bytes=
2015-07-08T19:45:29.464868+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2015-07-08T19:45:29.464980+00:00 heroku[web.1]: Stopping process with SIGKILL
2015-07-08T19:45:30.260616+00:00 heroku[web.1]: State changed from starting to crashed
2015-07-08T19:45:30.232546+00:00 heroku[web.1]: Process exited with status 137
2015-07-08T19:45:31.540913+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=dock.herokuapp.com request_id=87ac9f5f-74f2-4010-ada0-38481ec6246e fwd="65.88.88.175" dyno= connect= service= status=503 bytes=
2015-07-08T19:45:31.907041+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=dock.herokuapp.com request_id=53a948f8-a845-4e92-946a-e9706c03d4bd fwd="65.88.88.175" dyno= connect= service= status=503 bytes=
2015-07-08T19:46:41.940958+00:00 heroku[api]: Deploy 21adb89 by eric.gnplaw#gmail.com
2015-07-08T19:46:41.940988+00:00 heroku[api]: Release v11 created by eric.gnplaw#gmail.com
2015-07-08T19:46:42.013531+00:00 heroku[slug-compiler]: Slug compilation started
2015-07-08T19:46:42.013554+00:00 heroku[slug-compiler]: Slug compilation finished
2015-07-08T19:46:42.619968+00:00 heroku[web.1]: State changed from crashed to starting
2015-07-08T19:46:45.258343+00:00 heroku[web.1]: Starting process with command `./node_modules/.bin/forever -m 5 server.js`
2015-07-08T19:46:46.710824+00:00 app[web.1]: Detected 512 MB available memory, 512 MB limit per process (WEB_MEMORY)
2015-07-08T19:46:46.710847+00:00 app[web.1]: Recommending WEB_CONCURRENCY=1
2015-07-08T19:46:47.136829+00:00 app[web.1]: warn: --minUptime not set. Defaulting to: 1000ms
2015-07-08T19:46:47.247287+00:00 app[web.1]: Application loaded using the "production" environment configuration
2015-07-08T19:46:47.137695+00:00 app[web.1]: warn: --spinSleepTime not set. Your script will exit if it does not stay up for at least 1000ms
2015-07-08T19:46:48.259485+00:00 app[web.1]: MEAN.JS application started on port 56609
2015-07-08T19:46:48.741917+00:00 heroku[web.1]: State changed from starting to up
2015-07-08T19:46:49.336931+00:00 heroku[router]: at=info method=GET path="/" host=dock.herokuapp.com request_id=ecc3844e-2fab-45ab-a809-5db0b258b666 fwd="65.88.88.175" dyno=web.1 connect=0ms service=86ms status=200 bytes=1349
2015-07-08T19:46:49.457576+00:00 heroku[router]: at=info method=GET path="/lib/bootstrap/dist/css/bootstrap.min.css" host=dock.herokuapp.com request_id=8353bda8-7869-4f8e-a1a1-2e4fea9e7e9c fwd="65.88.88.175" dyno=web.1 connect=1ms service=23ms status=200 bytes=20179
2015-07-08T19:46:49.488707+00:00 heroku[router]: at=info method=GET path="/lib/angular-touch/angular-touch.js" host=dock.herokuapp.com request_id=fd0582a1-6fd2-4588-9f73-8b02b6549850 fwd="65.88.88.175" dyno=web.1 connect=1ms service=11ms status=200 bytes=7204
2015-07-08T19:46:49.539287+00:00 heroku[router]: at=info method=GET path="/lib/angular-sanitize/angular-sanitize.js" host=dock.herokuapp.com request_id=54b36b9e-02e6-4711-a718-2d47579ea9c8 fwd="65.88.88.175" dyno=web.1 connect=1ms service=11ms status=200 bytes=7179
2015-07-08T19:46:49.571068+00:00 heroku[router]: at=info method=GET path="/lib/angular-ui-router/release/angular-ui-router.min.js" host=dock.herokuapp.com request_id=9aff059d-2f86-4d3b-8a43-8e8b7a9cd4bf fwd="65.88.88.175" dyno=web.1 connect=2ms service=16ms status=200 bytes=11722
2015-07-08T19:46:49.596999+00:00 heroku[router]: at=info method=GET path="/lib/angular-ui-utils/ui-utils.min.js" host=dock.herokuapp.com request_id=84588746-3b29-4741-8767-0b808c8b610d fwd="65.88.88.175" dyno=web.1 connect=0ms service=11ms status=200 bytes=8882
2015-07-08T19:46:49.631952+00:00 heroku[router]: at=info method=GET path="/lib/angular-bootstrap/ui-bootstrap-tpls.min.js" host=dock.herokuapp.com request_id=e14a676e-b114-432c-bfac-2bde20a4abf4 fwd="65.88.88.175" dyno=web.1 connect=0ms service=17ms status=200 bytes=17765
2015-07-08T19:46:50.461782+00:00 heroku[router]: at=info method=GET path="/lib/angular-cookies/angular-cookies.js" host=dock.herokuapp.com request_id=9d8981bf-e17a-4875-8830-e52100300780 fwd="65.88.88.175" dyno=web.1 connect=0ms service=26ms status=200 bytes=2229
2015-07-08T19:46:50.463911+00:00 heroku[router]: at=info method=GET path="/lib/angular-resource/angular-resource.js" host=dock.herokuapp.com request_id=2785b451-07bc-4ce4-b9f5-a376b2338de5 fwd="65.88.88.175" dyno=web.1 connect=0ms service=28ms status=200 bytes=8366
2015-07-08T19:46:50.469210+00:00 heroku[router]: at=info method=GET path="/lib/bootstrap/dist/css/bootstrap-theme.min.css" host=dock.herokuapp.com request_id=b9c125e6-5871-4f0c-9dc3-b9d293dd2354 fwd="65.88.88.175" dyno=web.1 connect=2ms service=27ms status=200 bytes=3184
2015-07-08T19:46:50.476196+00:00 heroku[router]: at=info method=GET path="/lib/angular/angular.min.js" host=dock.herokuapp.com request_id=d6646cf0-4e9b-4b10-a46b-aed279dbe8b5 fwd="65.88.88.175" dyno=web.1 connect=0ms service=38ms status=200 bytes=40444
2015-07-08T19:46:50.626750+00:00 heroku[router]: at=info method=GET path="/modules/core/img/brand/favicon.ico" host=dock.herokuapp.com request_id=c31158bd-0091-4569-a456-61f807878872 fwd="65.88.88.175" dyno=web.1 connect=0ms service=7ms status=200 bytes=32415
2015-07-08T19:46:50.478453+00:00 heroku[router]: at=info method=GET path="/lib/angular-animate/angular-animate.js" host=dock.herokuapp.com request_id=7e8b068a-e9ac-4643-9943-13aef979b590 fwd="65.88.88.175" dyno=web.1 connect=0ms service=35ms status=200 bytes=16441