get error invalid host header when upload React code in Heroku - javascript

I get the error invalid host header
I don't know the reason please if anyone can help
.env
HOST=herokuapp.com
server.js
const express = require('express');
const path = require('path');
const app = express();
app.use(express.static(path.join(__dirname, 'build')));
app.get('*', function (req, res) {
res.sendFile(path.join(__dirname, 'build', 'index.html'));
});
app.listen(process.env.PORT);
package.json
"proxy": "http://localhost:5000",
when write Heroku log in console return this
if it will help you to find any solution and thanks all for trying
app[web.1]: Attempting to bind to HOST environment variable: herokuapp.com
app[web.1]: If this was unintentional, check that you haven't mistakenly set it in your shell.
app[web.1]: Learn more here: https://cra.link/advanced-config
app[web.1]:
app[web.1]: Could not find an open port at herokuapp.com.
app[web.1]: Network error message: listen EADDRNOTAVAIL: address not available 3.218.84.197
app[web.1]:
heroku[web.1]: Process exited with status 1
heroku[web.1]: State changed from starting to crashed
heroku[web.1]: State changed from crashed to starting
heroku[web.1]: Starting process with command `npm start`
app[web.1]:
app[web.1]: > client#0.1.0 start
app[web.1]: > react-scripts start
app[web.1]:
app[web.1]: Attempting to bind to HOST environment variable: herokuapp.com
app[web.1]: If this was unintentional, check that you haven't mistakenly set it in your shell.
app[web.1]: Learn more here: https://cra.link/advanced-config
app[web.1]:
app[web.1]: Could not find an open port at herokuapp.com.
app[web.1]: Network error message: listen EADDRNOTAVAIL: address not available 23.21.41.134
app[web.1]:
heroku[web.1]: Process exited with status 1
heroku[web.1]: State changed from starting to crashed
heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=ahmed-radi-bank-system.herokuapp.com request_id=1fe76374-c2b2-4742-8274-ac29595f176b fwd="156.222.196.219" dyno= connect= service= status=503 bytes= protocol=https
heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=ahmed-radi-bank-system.herokuapp.com request_id=729f1256-9d7e-4cfa-83e7-0fcb59b886a2 fwd="156.222.196.219" dyno= connect=
service= status=503 bytes= protocol=https
heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=ahmed-radi-bank-system.herokuapp.com request_id=7cea8936-c5d5-4171-9c79-e6795e805cc9 fwd="156.222.196.219" dyno= connect= service= status=503 bytes= protocol=https
heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=ahmed-radi-bank-system.herokuapp.com request_id=581a5de7-c23d-496e-a27f-5ade070cc55b fwd="156.222.196.219" dyno= connect=
service= status=503 bytes= protocol=https

I will upload my project on Netify

Related

Favicon error when checking heroku logs. App won't open

2023-02-04T23:44:59.721312+00:00 app[web.1]: Node.js v18.13.0
2023-02-04T23:44:59.863463+00:00 heroku[web.1]: Process exited with status 1
2023-02-04T23:44:59.923817+00:00 heroku[web.1]: State changed from up to crashed
2023-02-04T23:44:59.726175+00:00 heroku[router]: at=error code=H13 desc="Connection closed without response" method=GET path="/" host=ancient-fjord-54261.herokuapp.com request_id=889838b4-68b1-4f29-a43b-69a1a596ebdf fwd="75.97.100.189" dyno=web.1 connect=0ms service=28172ms status=503 bytes=0 protocol=https
2023-02-04T23:45:05.030038+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=ancient-fjord-54261.herokuapp.com request_id=44e68370-195a-4e1e-97c7-66a443516f57 fwd="75.97.100.189" dyno=web.1 connect=5001ms service= status=503 bytes= protocol=https
Here's the code in my app.js. I pushed this and the other files to Heroku. Heroku CLI updated, all packages installed. Compared my app.js to the get-started index.js and made some changes to my app.js and still getting the error and won't open.
I'm doing a course on udemy for web development and its not updated for this year, so I'm having to troubleshoot every now and then. First time on stackoverflow so I need a little bit of help.
Can anyone help me with fixing this or provide me with some links to help out with troubleshooting?

NPM error in Node.js

I'm trying to do Todo routes deployed on Heroku successfully but shows application error. When checked the heroku logs file it shows the following error mentioned in Log file
I have used node.js mongodb mongoose and Heroku to deploy with mlab
Node version
Node version node : 8.11.2
Log file
2018-06-23T10:53:43.168794+00:00 app[web.1]: npm ERR! spawn ENOENT
2018-06-23T10:53:43.169086+00:00 app[web.1]: npm ERR!
2018-06-23T10:53:43.169299+00:00 app[web.1]: npm ERR! Failed at the nodetodo#1.0.0 prestart script.
2018-06-23T10:53:43.169500+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2018-06-23T10:53:43.174385+00:00 app[web.1]:
2018-06-23T10:53:43.174622+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2018-06-23T10:53:43.174799+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2018-06-23T10_53_43_171Z-debug.log
2018-06-23T10:53:43.275561+00:00 heroku[web.1]: State changed from crashed to starting
2018-06-23T10:53:46.634454+00:00 heroku[web.1]: Starting process with command `npm start`
2018-06-23T10:53:49.572029+00:00 heroku[web.1]: Process exited with status 1
2018-06-23T10:53:49.589326+00:00 heroku[web.1]: State changed from starting to crashed
2018-06-23T10:53:49.452654+00:00 app[web.1]:
2018-06-23T10:53:49.452675+00:00 app[web.1]: > nodetodo#1.0.0 prestart /app
2018-06-23T10:53:49.452677+00:00 app[web.1]: > next build
2018-06-23T10:53:49.452678+00:00 app[web.1]:
2018-06-23T10:53:49.461849+00:00 app[web.1]: sh: 1: next: not found
2018-06-23T10:53:49.476477+00:00 app[web.1]: npm ERR! file sh
2018-06-23T10:53:49.476762+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2018-06-23T10:53:49.477051+00:00 app[web.1]: npm ERR! errno ENOENT
2018-06-23T10:53:49.477332+00:00 app[web.1]: npm ERR! syscall spawn
2018-06-23T10:53:49.479006+00:00 app[web.1]: npm ERR! nodetodo#1.0.0 prestart: `next build`
2018-06-23T10:53:49.479274+00:00 app[web.1]: npm ERR! spawn ENOENT
2018-06-23T10:53:49.479567+00:00 app[web.1]: npm ERR!
2018-06-23T10:53:49.479782+00:00 app[web.1]: npm ERR! Failed at the nodetodo#1.0.0 prestart script.
2018-06-23T10:53:49.479988+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2018-06-23T10:53:49.488380+00:00 app[web.1]:
2018-06-23T10:53:49.488650+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2018-06-23T10:53:49.488830+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2018-06-23T10_53_49_481Z-debug.log
2018-06-23T10:53:57.235315+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/todos" host=glacial-mesa-32050.herokuapp.com request_id=0cbc6b93-45b5-4e60-a716-6e87f9cfe8b5 fwd="111.91.116.52" dyno= connect= service= status=503 bytes= protocol=https
2018-06-23T10:53:57.875585+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=glacial-mesa-32050.herokuapp.com request_id=8a8c1304-b9ca-4684-8306-a70dca54e911 fwd="111.91.116.52" dyno= connect= service= status=503 bytes= protocol=https
2018-06-23T10:54:00.250909+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/todos" host=glacial-mesa-32050.herokuapp.com request_id=d4de12e1-d453-4a62-9ee0-4a99e2f78051 fwd="111.91.116.52" dyno= connect= service= status=503 bytes= protocol=https
2018-06-23T10:54:00.896607+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=glacial-mesa-32050.herokuapp.com request_id=8e52a8d5-2bd2-4e95-a8e6-7e43c21bd369 fwd="111.91.116.52" dyno= connect= service= status=503 bytes= protocol=https
2018-06-23T10:54:04.255637+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/todos" host=glacial-mesa-32050.herokuapp.com request_id=8d68216f-f176-4f79-91b5-cb10b02c8fc3 fwd="111.91.116.52" dyno= connect= service= status=503 bytes= protocol=https
2018-06-23T10:54:04.866164+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=glacial-mesa-32050.herokuapp.com request_id=5ebf6203-d866-42ff-baf7-f57179248c73 fwd="111.91.116.52" dyno= connect= service= status=503 bytes= protocol=https
2018-06-23T10:54:06.844189+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/todos" host=glacial-mesa-32050.herokuapp.com request_id=11ce1294-b8a5-4046-ad2b-1db482422355 fwd="111.91.116.52" dyno= connect= service= status=503 bytes= protocol=https
2018-06-23T10:54:07.474661+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=glacial-mesa-32050.herokuapp.com request_id=98c0098c-c969-4491-99d3-aa6f29eb836f fwd="111.91.116.52" dyno= connect= service= status=503 bytes= protocol=https
2018-06-23T10:57:10.708198+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=glacial-mesa-32050.herokuapp.com request_id=b3fc81b7-4a7a-438c-8482-e0b68b8e52d0 fwd="111.91.116.52" dyno= connect= service= status=503 bytes= protocol=https
2018-06-23T10:57:11.197790+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=glacial-mesa-32050.herokuapp.com request_id=b8c7fff9-7304-4e63-8fea-50d9e7525cf2 fwd="111.91.116.52" dyno= connect= service= status=503 bytes= protocol=https
2018-06-23T10:57:21.844958+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/todos" host=glacial-mesa-32050.herokuapp.com request_id=b0fa0c40-3fed-4da9-b680-6b55864ae418 fwd="111.91.116.52" dyno= connect= service= status=503 bytes= protocol=https
2018-06-23T10:57:24.013893+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=glacial-mesa-32050.herokuapp.com request_id=8b0ac5ed-ea76-4ee4-b1a8-99ba8520c986 fwd="111.91.116.52" dyno= connect= service= status=503 bytes= protocol=https
2018-06-23T11:05:45.000000+00:00 app[api]: Build started by user #gmail.com
2018-06-23T11:05:58.286485+00:00 app[api]: Deploy 6ab35c64 by user #gmail.com
2018-06-23T11:05:58.286485+00:00 app[api]: Release v5 created by user #gmail.com
2018-06-23T11:05:58.000000+00:00 app[api]: Build succeeded
2018-06-23T11:06:00.741880+00:00 heroku[web.1]: State changed from crashed to starting
2018-06-23T11:06:04.111616+00:00 heroku[web.1]: Starting process with command `npm start`
2018-06-23T11:06:06.707945+00:00 app[web.1]:
2018-06-23T11:06:06.707971+00:00 app[web.1]: > nodetodo#1.0.0 start /app
2018-06-23T11:06:06.707972+00:00 app[web.1]: > node server/server.js
2018-06-23T11:06:06.707974+00:00 app[web.1]:
2018-06-23T11:06:07.594283+00:00 app[web.1]: Started at port 38896
2018-06-23T11:06:07.622294+00:00 app[web.1]:
2018-06-23T11:06:07.622298+00:00 app[web.1]: /app/node_modules/mongoose/node_modules/mongodb/lib/server.js:242
2018-06-23T11:06:07.622300+00:00 app[web.1]: process.nextTick(function() { throw err; })
2018-06-23T11:06:07.622302+00:00 app[web.1]: ^
2018-06-23T11:06:07.622338+00:00 app[web.1]: Error: connect ECONNREFUSED 127.0.0.1:27017
2018-06-23T11:06:07.622340+00:00 app[web.1]: at Object._errnoException (util.js:992:11)
2018-06-23T11:06:07.622342+00:00 app[web.1]: at _exceptionWithHostPort (util.js:1014:20)
2018-06-23T11:06:07.622344+00:00 app[web.1]: at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1186:14)
2018-06-23T11:06:07.632652+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2018-06-23T11:06:07.633131+00:00 app[web.1]: npm ERR! errno 1
2018-06-23T11:06:07.634834+00:00 app[web.1]: npm ERR! nodetodo#1.0.0 start: `node server/server.js`
2018-06-23T11:06:07.635359+00:00 app[web.1]: npm ERR!
2018-06-23T11:06:07.635590+00:00 app[web.1]: npm ERR! Failed at the nodetodo#1.0.0 start script.
2018-06-23T11:06:07.635057+00:00 app[web.1]: npm ERR! Exit status 1
2018-06-23T11:06:07.635807+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2018-06-23T11:06:07.642357+00:00 app[web.1]:
2018-06-23T11:06:07.642642+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2018-06-23T11:06:07.642830+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2018-06-23T11_06_07_637Z-debug.log
2018-06-23T11:06:07.695625+00:00 heroku[web.1]: Process exited with status 1
2018-06-23T11:06:07.822414+00:00 heroku[web.1]: State changed from starting to crashed
2018-06-23T11:06:07.826000+00:00 heroku[web.1]: State changed from crashed to starting
2018-06-23T11:06:10.546996+00:00 heroku[web.1]: Starting process with command `npm start`
2018-06-23T11:06:12.650782+00:00 app[web.1]:
2018-06-23T11:06:12.650804+00:00 app[web.1]: > nodetodo#1.0.0 start /app
2018-06-23T11:06:12.650806+00:00 app[web.1]: > node server/server.js
2018-06-23T11:06:12.650807+00:00 app[web.1]:
2018-06-23T11:06:13.248399+00:00 app[web.1]: Started at port 4126
2018-06-23T11:06:13.264689+00:00 app[web.1]:
2018-06-23T11:06:13.264697+00:00 app[web.1]: process.nextTick(function() { throw err; })
2018-06-23T11:06:13.264695+00:00 app[web.1]: /app/node_modules/mongoose/node_modules/mongodb/lib/server.js:242
2018-06-23T11:06:13.264699+00:00 app[web.1]: ^
2018-06-23T11:06:13.264700+00:00 app[web.1]: Error: connect ECONNREFUSED 127.0.0.1:27017
2018-06-23T11:06:13.264701+00:00 app[web.1]: at Object._errnoException (util.js:992:11)
2018-06-23T11:06:13.264703+00:00 app[web.1]: at _exceptionWithHostPort (util.js:1014:20)
2018-06-23T11:06:13.264705+00:00 app[web.1]: at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1186:14)
2018-06-23T11:06:13.271195+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2018-06-23T11:06:13.271503+00:00 app[web.1]: npm ERR! errno 1
2018-06-23T11:06:13.272534+00:00 app[web.1]: npm ERR! nodetodo#1.0.0 start: `node server/server.js`
2018-06-23T11:06:13.272816+00:00 app[web.1]: npm ERR!
2018-06-23T11:06:13.272926+00:00 app[web.1]: npm ERR! Failed at the nodetodo#1.0.0 start script.
2018-06-23T11:06:13.272642+00:00 app[web.1]: npm ERR! Exit status 1
2018-06-23T11:06:13.273028+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2018-06-23T11:06:13.276839+00:00 app[web.1]:
2018-06-23T11:06:13.276972+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2018-06-23T11:06:13.277055+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2018-06-23T11_06_13_274Z-debug.log
2018-06-23T11:06:13.324927+00:00 heroku[web.1]: Process exited with status 1
2018-06-23T11:06:13.471063+00:00 heroku[web.1]: State changed from starting to crashed
2018-06-23T11:06:20.993262+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=glacial-mesa-32050.herokuapp.com request_id=6458108b-77d2-485c-ba53-9e523f8fff7f fwd="111.91.116.52" dyno= connect= service= status=503 bytes= protocol=https
2018-06-23T11:06:21.472089+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=glacial-mesa-32050.herokuapp.com request_id=dc99750e-aaba-4fc9-b7f5-fde727eb6201 fwd="111.91.116.52" dyno= connect= service= status=503 bytes= protocol=https
JSON file
{
"name": "nodetodo",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"start": "node server/server.js",
"test": "mocha server/**/*.test.js",
"test-watch": "nodemon --exec \"npm test\""
},
"engines": {
"node": "8.11.2"
},
"author": "",
"license": "ISC",
"dependencies": {
"body-parser": "^1.18.3",
"express": "^4.16.3",
"mongodb": "^2.2.35",
"mongoose": "^4.5.9"
},
"devDependencies": {
"expect": "^1.20.2",
"mocha": "^3.0.2",
"nodemon": "^1.10.2",
"supertest": "^2.0.0"
}
}
Please help
Have you tried npm cache clean -f ?
Okay, this error could be due to two reasons, so make sure you have followed these steps right
Make sure to bind your port
const PORT = process.env.PORT || 4126;
app.listen(PORT);
Make sure that you connect to online database and not to your local database.Use mlab uri. https://mlab.com/ Use this link for help Learn Mlab

getting a 503 error when uploading to heroku with my nodejs application

I have been struggling to get my app loaded to heroku for the past couple of days. I get over one hurdle and then meet another. Now I am getting a the following error.
Failed to load resource: the server responded with a status of 503 (Service Unavailable) /favicon.ico
On the logs I am getting these error messages.
2018-04-11T08:13:48.238214+00:00 app[web.1]: > rock-paper-scissors#1.0.0 start /app
2018-04-11T08:13:48.331598+00:00 app[web.1]: Server has started.
2018-04-11T08:13:48.238216+00:00 app[web.1]:
2018-04-11T08:13:48.238198+00:00 app[web.1]:
2018-04-11T08:14:46.646952+00:00 heroku[web.1]: State changed from starting to crashed
2018-04-11T08:14:46.571274+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2018-04-11T08:14:46.629369+00:00 heroku[web.1]: Process exited with status 137
2018-04-11T09:38:48.218885+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=brianpat-rock-paper-scissors.herokuapp.com request_id=0db40b3c-c918-4a3d-9a4d-f3a5fcf69bc8 fwd="94.174.32.117" dyno= connect= service= status=503 bytes= protocol=https
2018-04-11T09:38:48.541351+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=brianpat-rock-paper-scissors.herokuapp.com request_id=ecf56ae7-84e6-43a0-9a77-3e9f9a7f538f fwd="94.174.32.117" dyno= connect= service= status=503 bytes= protocol=https
Yesterday I was getting a Method not Allowed error and now I am not sure if it has moved on or not. Not sure if this is my end or whether this is a maintenance issue with heroku? Possibly my end. I have tried looking for the same error on Stackoverflow but they have not proved helpful. Any help would be appreciated.

How to deploy react js single page application (SPA)

I use react router make single page application, and I try to build it with npm run build then I upload build folder to my web-server but my website just shows background. I want to know how to make it work.
2017-04-26T19:06:27.864737+00:00 app[web.1]: npm ERR! Or if that isn't
available, you can get their info via:
2017-04-26T19:06:27.864910+00:00 app[web.1]: npm ERR! npm owner ls notes-app-client
2017-04-26T19:06:27.865077+00:00 app[web.1]: npm ERR! There is likely additional logging output above.
2017-04-26T19:06:27.870949+00:00 app[web.1]:
2017-04-26T19:06:27.871279+00:00 app[web.1]: npm ERR! Please include the
following file with any support request:
2017-04-26T19:06:27.871450+00:00 app[web.1]: npm ERR! /app/npm-debug.log
2017-04-26T19:06:27.993054+00:00 heroku[web.1]: State changed from starting to
crashed 2017-04-26T19:06:42.961236+00:00 heroku[router]: at=error code=H10 desc="App
crashed" method=GET path="/" host=educationapp.herokuapp.com
request_id=72015192-8122-4fba-beb0-69c8f1e38129 fwd="49.228.99.168" dyno=
connect= service= status=503 bytes= protocol=https
2017-04-26T19:06:43.534651+00:00 heroku[router]: at=error code=H10 desc="App
crashed" method=GET path="/favicon.ico" host=educationapp.herokuapp.com
request_id=83684431-92be-4080-a2f8-7165e21f6c72 fwd="49.228.99.168" dyno=
connect= service= status=503 bytes= protocol=https
2017-04-26T19:14:57.478915+00:00 heroku[router]: at=error code=H10 desc="App
crashed" method=GET path="/" host=educationapp.herokuapp.com
request_id=022a219d-2299-4d23-b713-6bb75497f0e6 fwd="49.228.99.168" dyno=
connect= service= status=503 bytes= protocol=https
2017-04-26T19:14:57.922975+00:00 heroku[router]: at=error code=H10 desc="App
crashed" method=GET path="/favicon.ico" host=educationapp.herokuapp.com
request_id=ae9bf961-22a9-47f8-be5d-234d97f83ca3 fwd="49.228.99.168" dyno=
connect= service= status=503 bytes= protocol=https
Heroku don't have official deployment buildpack for React apps. So you have to use create-react-app-buildpack by Mars Hall.
Here is the link to get this.
Please follow this documentation. It will help you if you have started your development using create-react-app.

Heroku, Node npm ERR! argv "/app/.heroku/node/bin/node" "/app/.heroku/node/bin/npm" "start"

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.

Categories

Resources