First project for Next.js deploying to Heroku, start script crashing? - reactjs

Any help for a newbie? This is my first next.js project in works fine on local with no warnings and passes deployment in heroku. But when i view app i get a error page to view my logs.
The tutorial that i was following was posted here https://medium.com/#jacoboakley/deploy-a-next-js-app-on-heroku-69bcb01db1b7
also have a git repo https://github.com/Narrabeen010/fifa-signup
Here is the output of my log:
2020-05-03T09:35:57.000000+00:00 app[api]: Build started by user user#gmail.com
2020-05-03T09:36:39.000000+00:00 app[api]: Build started by user user#gmail.com
2020-05-03T09:36:56.583782+00:00 app[api]: Release v7 created by user user#gmail.com
2020-05-03T09:36:56.583782+00:00 app[api]: Deploy fa8f626a by user user#gmail.com
2020-05-03T09:36:56.828593+00:00 heroku[web.1]: State changed from crashed to starting
2020-05-03T09:36:59.000000+00:00 app[api]: Build succeeded
2020-05-03T09:37:01.476773+00:00 heroku[web.1]: State changed from crashed to starting
2020-05-03T09:37:02.046480+00:00 heroku[web.1]: State changed from starting to crashed
2020-05-03T09:37:02.050475+00:00 heroku[web.1]: State changed from crashed to starting
2020-05-03T09:37:01.934341+00:00 app[web.1]:
2020-05-03T09:37:01.934359+00:00 app[web.1]: > donut-shop#1.0.0 start /app
2020-05-03T09:37:01.934359+00:00 app[web.1]: > next start -p $PORT
2020-05-03T09:37:01.934359+00:00 app[web.1]:
2020-05-03T09:37:01.940598+00:00 app[web.1]: sh: 1: next: not found
2020-05-03T09:37:01.945759+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2020-05-03T09:37:01.946029+00:00 app[web.1]: npm ERR! syscall spawn
2020-05-03T09:37:01.946248+00:00 app[web.1]: npm ERR! file sh
2020-05-03T09:37:01.946512+00:00 app[web.1]: npm ERR! errno ENOENT
2020-05-03T09:37:01.947788+00:00 app[web.1]: npm ERR! donut-shop#1.0.0 start: `next start -p $PORT`
2020-05-03T09:37:01.947905+00:00 app[web.1]: npm ERR! spawn ENOENT
2020-05-03T09:37:01.948044+00:00 app[web.1]: npm ERR!
2020-05-03T09:37:01.948166+00:00 app[web.1]: npm ERR! Failed at the donut-shop#1.0.0 start script.
2020-05-03T09:37:01.948288+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2020-05-03T09:37:01.958728+00:00 app[web.1]:
2020-05-03T09:37:01.959061+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2020-05-03T09:37:01.959255+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2020-05-03T09_37_01_949Z-debug.log
2020-05-03T09:37:06.245883+00:00 heroku[web.1]: State changed from starting to crashed
2020-05-03T09:37:06.150793+00:00 app[web.1]:
2020-05-03T09:37:06.150819+00:00 app[web.1]: > donut-shop#1.0.0 start /app
2020-05-03T09:37:06.150819+00:00 app[web.1]: > next start -p $PORT
2020-05-03T09:37:06.150819+00:00 app[web.1]:
2020-05-03T09:37:06.156507+00:00 app[web.1]: sh: 1: next: not found
2020-05-03T09:37:06.159958+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2020-05-03T09:37:06.160245+00:00 app[web.1]: npm ERR! syscall spawn
2020-05-03T09:37:06.160445+00:00 app[web.1]: npm ERR! file sh
2020-05-03T09:37:06.160667+00:00 app[web.1]: npm ERR! errno ENOENT
2020-05-03T09:37:06.161657+00:00 app[web.1]: npm ERR! donut-shop#1.0.0 start: `next start -p $PORT`
2020-05-03T09:37:06.161787+00:00 app[web.1]: npm ERR! spawn ENOENT
2020-05-03T09:37:06.161951+00:00 app[web.1]: npm ERR!
2020-05-03T09:37:06.162087+00:00 app[web.1]: npm ERR! Failed at the donut-shop#1.0.0 start script.
2020-05-03T09:37:06.162208+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2020-05-03T09:37:06.169114+00:00 app[web.1]:
2020-05-03T09:37:06.169269+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2020-05-03T09:37:06.169311+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2020-05-03T09_37_06_162Z-debug.log
2020-05-03T09:37:36.413398+00:00 app[api]: Release v8 created by user user#gmail.com
2020-05-03T09:37:36.413398+00:00 app[api]: Deploy fa8f626a by user user#gmail.com
2020-05-03T09:37:36.889585+00:00 heroku[web.1]: State changed from crashed to starting
2020-05-03T09:37:39.000000+00:00 app[api]: Build succeeded
2020-05-03T09:37:41.156687+00:00 heroku[web.1]: State changed from starting to crashed
2020-05-03T09:37:41.035745+00:00 app[web.1]:
2020-05-03T09:37:41.035763+00:00 app[web.1]: > donut-shop#1.0.0 start /app
2020-05-03T09:37:41.035763+00:00 app[web.1]: > next start -p $PORT
2020-05-03T09:37:41.035764+00:00 app[web.1]:
2020-05-03T09:37:41.089773+00:00 app[web.1]: sh: 1: next: not found
2020-05-03T09:37:41.093458+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2020-05-03T09:37:41.093677+00:00 app[web.1]: npm ERR! syscall spawn
2020-05-03T09:37:41.093814+00:00 app[web.1]: npm ERR! file sh
2020-05-03T09:37:41.093974+00:00 app[web.1]: npm ERR! errno ENOENT
2020-05-03T09:37:41.094896+00:00 app[web.1]: npm ERR! donut-shop#1.0.0 start: `next start -p $PORT`
2020-05-03T09:37:41.094979+00:00 app[web.1]: npm ERR! spawn ENOENT
2020-05-03T09:37:41.095109+00:00 app[web.1]: npm ERR!
2020-05-03T09:37:41.095240+00:00 app[web.1]: npm ERR! Failed at the donut-shop#1.0.0 start script.
2020-05-03T09:37:41.095322+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2020-05-03T09:37:41.101385+00:00 app[web.1]:
2020-05-03T09:37:41.101509+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2020-05-03T09:37:41.101588+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2020-05-03T09_37_41_096Z-debug.log
2020-05-03T09:37:47.263815+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=shielded-badlands-93212.herokuapp.com request_id=986c053b-b4eb-4f87-b1f2-265469dec1dd fwd="220.240.26.177" dyno= connect= service= status=503 bytes= protocol=https
2020-05-03T09:37:48.567909+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=shielded-badlands-93212.herokuapp.com request_id=3c65fd8b-0808-4746-91f9-406a4543c434 fwd="220.240.26.177" dyno= connect= service= status=503 bytes= protocol=https
Package.json file:
{
"name": "donut-shop",
"version": "1.0.0",
"scripts": {
"dev": "next",
"build": "next build",
"start": "next start -p $PORT",
"heroku-postbuild": "npm run build",
"test": "echo \"Error: no test specified\" && exit 1"
},
"dependencies": {
"#emotion/core": "^10.0.27",
"#emotion/styled": "^10.0.27",
"#stripe/react-stripe-js": "^1.1.2",
"#stripe/stripe-js": "^1.5.0",
"axios": "^0.19.2",
"next": "latest",
"react": "^16.7.0",
"react-confetti": "^5.0.1",
"react-dom": "^16.7.0",
"stripe": "^8.15.0"
},
"license": "MIT",
"devDependencies": {
"dotenv": "^8.2.0"
}
}
any help to point in the right direct would be awesome legends!

I noticed you were using a guide from 2017.
Might be better to use this guide from 2019 instead: https://medium.com/swlh/how-to-host-your-next-js-application-for-free-on-heroku-c6ba99ebb8b8
These frameworks do change fast, and makes older guides inadequate

Related

Heroku failed due to heroku[router]

I have nooooooo idea what happened or how to fix it. But I know the build and deploy succeeded, yet there was an error when it tried to serve on the heroku domain. This is the log
2021-09-23T17:54:03.000000+00:00 app[api]: Build started by user lotusms#outlook.com
2021-09-23T17:57:33.106282+00:00 app[api]: Deploy 311dbfec by user lotusms#outlook.com
2021-09-23T17:57:33.106282+00:00 app[api]: Release v5 created by user lotusms#outlook.com
2021-09-23T17:57:33.643634+00:00 heroku[web.1]: State changed from crashed to starting
2021-09-23T17:57:34.000000+00:00 app[api]: Build succeeded
2021-09-23T17:57:41.831375+00:00 heroku[web.1]: Starting process with command `npm start`
2021-09-23T17:57:42.751649+00:00 app[web.1]:
2021-09-23T17:57:42.751663+00:00 app[web.1]: > luis-portfolio#1.0.0 start /app
2021-09-23T17:57:42.751664+00:00 app[web.1]: > node backend/server.js
2021-09-23T17:57:42.751664+00:00 app[web.1]:
2021-09-23T17:57:42.850572+00:00 app[web.1]: internal/modules/cjs/loader.js:892
2021-09-23T17:57:42.850573+00:00 app[web.1]: throw err;
2021-09-23T17:57:42.850574+00:00 app[web.1]: ^
2021-09-23T17:57:42.850574+00:00 app[web.1]:
2021-09-23T18:11:55.176407+00:00 app[web.1]: Error: Cannot find module 'express-handlebars'
2021-09-23T18:11:55.176408+00:00 app[web.1]: Require stack:
2021-09-23T18:11:55.176408+00:00 app[web.1]: - /app/backend/server.js
2021-09-23T18:11:55.176409+00:00 app[web.1]: at Function.Module._resolveFilename (internal/modules/cjs/loader.js:889:15)
2021-09-23T18:11:55.176409+00:00 app[web.1]: at Function.Module._load (internal/modules/cjs/loader.js:745:27)
2021-09-23T18:11:55.176410+00:00 app[web.1]: at Module.require (internal/modules/cjs/loader.js:961:19)
2021-09-23T18:11:55.176410+00:00 app[web.1]: at require (internal/modules/cjs/helpers.js:92:18)
2021-09-23T18:11:55.176410+00:00 app[web.1]: at Object.<anonymous> (/app/backend/server.js:3:25)
2021-09-23T18:11:55.176410+00:00 app[web.1]: at Module._compile (internal/modules/cjs/loader.js:1072:14)
2021-09-23T18:11:55.176411+00:00 app[web.1]: at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
2021-09-23T18:11:55.176411+00:00 app[web.1]: at Module.load (internal/modules/cjs/loader.js:937:32)
2021-09-23T18:11:55.176411+00:00 app[web.1]: at Function.Module._load (internal/modules/cjs/loader.js:778:12)
2021-09-23T18:11:55.176412+00:00 app[web.1]: code: 'MODULE_NOT_FOUND',
2021-09-23T18:11:55.176413+00:00 app[web.1]: requireStack: [ '/app/backend/server.js' ]
2021-09-23T18:11:55.183165+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2021-09-23T18:11:55.183332+00:00 app[web.1]: npm ERR! errno 1
2021-09-23T18:11:55.187383+00:00 app[web.1]: npm ERR! luis-portfolio#1.0.0 start: `node backend/server.js`
2021-09-23T18:11:55.187508+00:00 app[web.1]: npm ERR! Exit status 1
2021-09-23T18:11:55.187587+00:00 app[web.1]: npm ERR!
2021-09-23T18:11:55.187645+00:00 app[web.1]: npm ERR! Failed at the luis-portfolio#1.0.0 start script.
2021-09-23T18:11:55.187699+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2021-09-23T18:11:55.193992+00:00 app[web.1]:
2021-09-23T18:11:55.194070+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2021-09-23T18:11:55.194101+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2021-09-23T18_11_55_188Z-debug.log
2021-09-23T18:11:55.308995+00:00 heroku[web.1]: Process exited with status 1
2021-09-23T18:11:55.387625+00:00 heroku[web.1]: State changed from starting to crashed
2021-09-23T18:18:11.000000+00:00 app[api]: Build started by user lotusms#outlook.com
2021-09-23T18:21:37.829987+00:00 app[api]: Deploy 3133e1a6 by user lotusms#outlook.com
2021-09-23T18:21:37.829987+00:00 app[api]: Release v7 created by user lotusms#outlook.com
2021-09-23T18:21:38.000000+00:00 app[api]: Build succeeded
2021-09-23T18:21:38.201741+00:00 heroku[web.1]: State changed from crashed to starting
2021-09-23T18:21:48.297944+00:00 heroku[web.1]: Starting process with command `npm start`
2021-09-23T18:21:49.385182+00:00 app[web.1]:
2021-09-23T18:21:49.385194+00:00 app[web.1]: > luis-portfolio#1.0.0 start /app
2021-09-23T18:21:49.385194+00:00 app[web.1]: > node backend/server.js
2021-09-23T18:21:49.385195+00:00 app[web.1]:
2021-09-23T18:21:49.496716+00:00 app[web.1]: internal/modules/cjs/loader.js:892
2021-09-23T18:21:49.496718+00:00 app[web.1]: throw err;
2021-09-23T18:21:49.496718+00:00 app[web.1]: ^
2021-09-23T18:21:49.496719+00:00 app[web.1]:
2021-09-23T18:21:49.496719+00:00 app[web.1]: Error: Cannot find module 'cors'
2021-09-23T18:21:49.496719+00:00 app[web.1]: Require stack:
2021-09-23T18:21:49.496720+00:00 app[web.1]: - /app/backend/server.js
2021-09-23T18:21:49.496720+00:00 app[web.1]: at Function.Module._resolveFilename (internal/modules/cjs/loader.js:889:15)
2021-09-23T18:21:49.496720+00:00 app[web.1]: at Function.Module._load (internal/modules/cjs/loader.js:745:27)
2021-09-23T18:21:49.496721+00:00 app[web.1]: at Module.require (internal/modules/cjs/loader.js:961:19)
2021-09-23T18:21:49.496721+00:00 app[web.1]: at require (internal/modules/cjs/helpers.js:92:18)
2021-09-23T18:21:49.496722+00:00 app[web.1]: at Object.<anonymous> (/app/backend/server.js:5:25)
2021-09-23T18:21:49.496722+00:00 app[web.1]: at Module._compile (internal/modules/cjs/loader.js:1072:14)
2021-09-23T18:21:49.496722+00:00 app[web.1]: at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
2021-09-23T18:21:49.496723+00:00 app[web.1]: at Module.load (internal/modules/cjs/loader.js:937:32)
2021-09-23T18:21:49.496723+00:00 app[web.1]: at Function.Module._load (internal/modules/cjs/loader.js:778:12)
2021-09-23T18:21:49.496723+00:00 app[web.1]: at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12) {
2021-09-23T18:21:49.496724+00:00 app[web.1]: code: 'MODULE_NOT_FOUND',
2021-09-23T18:21:49.496724+00:00 app[web.1]: requireStack: [ '/app/backend/server.js' ]
2021-09-23T18:21:49.496724+00:00 app[web.1]: }
2021-09-23T18:21:49.512189+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2021-09-23T18:21:49.512362+00:00 app[web.1]: npm ERR! errno 1
2021-09-23T18:21:49.515739+00:00 app[web.1]: npm ERR! luis-portfolio#1.0.0 start: `node backend/server.js`
2021-09-23T18:21:49.515768+00:00 app[web.1]: npm ERR! Exit status 1
2021-09-23T18:21:49.515827+00:00 app[web.1]: npm ERR!
2021-09-23T18:21:49.515861+00:00 app[web.1]: npm ERR! Failed at the luis-portfolio#1.0.0 start script.
2021-09-23T18:21:49.515902+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2021-09-23T18:21:49.611964+00:00 app[web.1]:
2021-09-23T18:21:49.612101+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2021-09-23T18:21:49.612151+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2021-09-23T18_21_49_516Z-debug.log
2021-09-23T18:21:49.736450+00:00 heroku[web.1]: Process exited with status 1
2021-09-23T18:21:49.804463+00:00 heroku[web.1]: State changed from starting to crashed
2021-09-23T18:21:51.473081+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=radiant-brook-92705.herokuapp.com request_id=6652a47c-6241-4d4f-a967-ebd6c8db8091 fwd="71.57.243.26" dyno= connect= service= status=503 bytes= protocol=https
Luiss-Mac-mini:luis-portfolio lotusms$ heroku logs
2021-09-23T18:23:37.573784+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2021-09-23T18:23:37.573953+00:00 app[web.1]: npm ERR! errno 1
2021-09-23T18:23:37.577270+00:00 app[web.1]: npm ERR! luis-portfolio#1.0.0 start: `node backend/server.js`
2021-09-23T18:23:37.577315+00:00 app[web.1]: npm ERR! Exit status 1
2021-09-23T18:23:37.577365+00:00 app[web.1]: npm ERR!
2021-09-23T18:23:37.577402+00:00 app[web.1]: npm ERR! Failed at the luis-portfolio#1.0.0 start script.
2021-09-23T18:23:37.577442+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2021-09-23T18:23:37.580907+00:00 app[web.1]:
2021-09-23T18:23:37.580982+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2021-09-23T18:23:37.581018+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2021-09-23T18_23_37_577Z-debug.log
2021-09-23T18:23:37.695597+00:00 heroku[web.1]: Process exited with status 1
2021-09-23T18:23:37.741882+00:00 heroku[web.1]: State changed from starting to crashed
2021-09-23T18:23:37.746297+00:00 heroku[web.1]: State changed from crashed to starting
2021-09-23T18:23:47.676591+00:00 heroku[web.1]: Starting process with command `npm start`
2021-09-23T18:23:48.916311+00:00 app[web.1]:
2021-09-23T18:23:48.916324+00:00 app[web.1]: > luis-portfolio#1.0.0 start /app
2021-09-23T18:23:48.916325+00:00 app[web.1]: > node backend/server.js
2021-09-23T18:23:48.916325+00:00 app[web.1]:
2021-09-23T18:23:49.020052+00:00 app[web.1]: internal/modules/cjs/loader.js:892
2021-09-23T18:23:49.020053+00:00 app[web.1]: throw err;
2021-09-23T18:23:49.020054+00:00 app[web.1]: ^
2021-09-23T18:23:49.020054+00:00 app[web.1]:
Luiss-Mac-mini:luis-portfolio lotusms$
What is going in here?
P.S. It's an app built with React in a client folder, and Express in a backend folder. Then an main package running the following
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "nodemon --watch backend --exec node backend/server.js",
"server": "nodemon backend/server.js",
"client": "npm start --prefix client",
"frontend": "npm run start --prefix client",
"dev": "concurrently \"npm run server\" \"npm run start --prefix client\"",
"heroku-postbuild": "NPM_CONFIG_PRODUCTION=false npm install --prefix client && npm run build --prefix client"
},
Thanks in advance
Well, here's what fixed it for me. First of all this may be different for you if you have a different root architecture than mine. Your package.json and node_modules and dependencies may be in different places. But you can at least use my solution as a reference and adjust accordingly.
Root Struture
node_modules
package.json //we'll call it root-package for reference
- backend
- node_modules
package.json //we'll call it backend-package for reference
server.js
- client
- node_modules
- public
- build
- src
package.json //we'll call it frontend-package for reference
Though my entry is server.js in the backend folder, I am actually entering through an outer wrapping folder so I can keep a separation of concerns between the backend and client.
I moved all my package.json packages installed in devDependencies to the dependencies folder and made sure that my root-package.json served both of my backend-package.json and frontend-package.json concurrently and the directory was correct.
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"client-install": "npm install --prefix client",
"start": "node backend/server.js",
"server": "nodemon backend/server.js",
"client": "npm start --prefix client",
"dev": "concurrently \"npm run server\" \"npm run client\"",
"heroku-postbuild": "NPM_CONFIG_PRODUCTION=false npm install --prefix client && npm run build --prefix client"
},

Failed run application in heroku with adonis,next,react app framework

I have problem when deploy my app to heroku, i'm using react,next,adonis for build this app.
My env i put in reveal config vars heroku manually
This is my logs error in heroku tail
2019-08-20T09:26:20.148145+00:00 heroku[web.1]: Starting process with command `npm start`
2019-08-20T09:26:22.364045+00:00 app[web.1]:
2019-08-20T09:26:22.364077+00:00 app[web.1]: > adonis-fullstack-app#4.1.0 start /app
2019-08-20T09:26:22.364079+00:00 app[web.1]: > node server.js --production
2019-08-20T09:26:22.364081+00:00 app[web.1]:
2019-08-20T09:26:22.998945+00:00 app[web.1]:
2019-08-20T09:26:22.998985+00:00 app[web.1]: WARNING: Adonis has detected an unhandled promise rejection, which may
2019-08-20T09:26:22.998988+00:00 app[web.1]: cause undesired behavior in production.
2019-08-20T09:26:22.998991+00:00 app[web.1]: To stop this warning, use catch() on promises or wrap await
2019-08-20T09:26:22.998993+00:00 app[web.1]: calls inside try/catch.
2019-08-20T09:26:22.998995+00:00 app[web.1]:
2019-08-20T09:26:23.003594+00:00 app[web.1]: { Error: ENOENT: no such file or directory, open '/app/.env'
2019-08-20T09:26:23.003598+00:00 app[web.1]: at Object.openSync (fs.js:443:3)
2019-08-20T09:26:23.003600+00:00 app[web.1]: at Object.readFileSync (fs.js:343:35)
2019-08-20T09:26:23.003602+00:00 app[web.1]: at Env.load (/app/node_modules/#adonisjs/framework/src/Env/index.js:110:41)
2019-08-20T09:26:23.003605+00:00 app[web.1]: at new Env (/app/node_modules/#adonisjs/framework/src/Env/index.js:42:22)
2019-08-20T09:26:23.003607+00:00 app[web.1]: at Object.app.singleton [as closure] (/app/node_modules/#adonisjs/framework/providers/AppProvider.js:29:14)
2019-08-20T09:26:23.003610+00:00 app[web.1]: at Ioc._resolveBinding (/app/node_modules/#adonisjs/fold/src/Ioc/index.js:231:68)
2019-08-20T09:26:23.003612+00:00 app[web.1]: at Ioc.use (/app/node_modules/#adonisjs/fold/src/Ioc/index.js:731:19)
2019-08-20T09:26:23.003614+00:00 app[web.1]: at NextProvider.register (/app/node_modules/adonis-nextjs/providers/NextProvider/index.js:38:24)
2019-08-20T09:26:23.003615+00:00 app[web.1]: at _.filter.each (/app/node_modules/#adonisjs/fold/src/Registrar/index.js:128:36)
2019-08-20T09:26:23.003618+00:00 app[web.1]: at arrayEach (/app/node_modules/lodash/lodash.js:516:11) errno: -2, syscall: 'open', code: 'ENOENT', path: '/app/.env' }
2019-08-20T09:26:23.021016+00:00 app[web.1]:
2019-08-20T09:26:23.021021+00:00 app[web.1]: Error: ENOENT: no such file or directory, open '/app/.env'
2019-08-20T09:26:23.021023+00:00 app[web.1]:
2019-08-20T09:26:23.021024+00:00 app[web.1]:
2019-08-20T09:26:23.021026+00:00 app[web.1]: 1 Env.load
2019-08-20T09:26:23.021028+00:00 app[web.1]: /app/node_modules/#adonisjs/framework/src/Env/index.js:110
2019-08-20T09:26:23.021030+00:00 app[web.1]:
2019-08-20T09:26:23.021032+00:00 app[web.1]: 2 new Env
2019-08-20T09:26:23.021035+00:00 app[web.1]: /app/node_modules/#adonisjs/framework/src/Env/index.js:42
2019-08-20T09:26:23.021036+00:00 app[web.1]:
2019-08-20T09:26:23.021039+00:00 app[web.1]: 3 Object.app.singleton [as closure]
2019-08-20T09:26:23.021041+00:00 app[web.1]: /app/node_modules/#adonisjs/framework/providers/AppProvider.js:29
2019-08-20T09:26:23.021043+00:00 app[web.1]:
2019-08-20T09:26:23.021045+00:00 app[web.1]: 4 Ioc._resolveBinding
2019-08-20T09:26:23.021047+00:00 app[web.1]: /app/node_modules/#adonisjs/fold/src/Ioc/index.js:231
2019-08-20T09:26:23.021049+00:00 app[web.1]:
2019-08-20T09:26:23.021051+00:00 app[web.1]: 5 Ioc.use
2019-08-20T09:26:23.021053+00:00 app[web.1]: /app/node_modules/#adonisjs/fold/src/Ioc/index.js:731
2019-08-20T09:26:23.021055+00:00 app[web.1]:
2019-08-20T09:26:23.021057+00:00 app[web.1]: 6 AppProvider.boot
2019-08-20T09:26:23.021059+00:00 app[web.1]: /app/node_modules/#adonisjs/framework/providers/AppProvider.js:337
2019-08-20T09:26:23.021061+00:00 app[web.1]:
2019-08-20T09:26:23.021063+00:00 app[web.1]: 7 _.filter.map
2019-08-20T09:26:23.021065+00:00 app[web.1]: /app/node_modules/#adonisjs/fold/src/Registrar/index.js:147
2019-08-20T09:26:23.021066+00:00 app[web.1]:
2019-08-20T09:26:23.021068+00:00 app[web.1]: 8 arrayMap
2019-08-20T09:26:23.021070+00:00 app[web.1]: /app/node_modules/lodash/lodash.js:639
2019-08-20T09:26:23.021072+00:00 app[web.1]:
2019-08-20T09:26:23.029460+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2019-08-20T09:26:23.029933+00:00 app[web.1]: npm ERR! errno 1
2019-08-20T09:26:23.031184+00:00 app[web.1]: npm ERR! adonis-fullstack-app#4.1.0 start: `node server.js --production`
2019-08-20T09:26:23.031327+00:00 app[web.1]: npm ERR! Exit status 1
2019-08-20T09:26:23.031582+00:00 app[web.1]: npm ERR!
2019-08-20T09:26:23.031795+00:00 app[web.1]: npm ERR! Failed at the adonis-fullstack-app#4.1.0 start script.
2019-08-20T09:26:23.032063+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2019-08-20T09:26:23.037560+00:00 app[web.1]:
2019-08-20T09:26:23.037776+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2019-08-20T09:26:23.037921+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2019-08-20T09_26_23_033Z-debug.log
2019-08-20T09:26:23.100987+00:00 heroku[web.1]: Process exited with status 1
2019-08-20T09:26:23.118856+00:00 heroku[web.1]: State changed from starting to crashed
2019-08-20T09:26:35.633644+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=myapp.herokuapp.com request_id=d42ff289-f989-4386-a521-d22a650b44ba fwd="103.87.85.198" dyno= connect= service= status=503 bytes= protocol=https
2019-08-20T09:26:35.979151+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=myapp.herokuapp.com request_id=44d7c31f-3b53-49dd-a6b0-13fa5b113004 fwd="103.87.85.198" dyno= connect= service= status=503 bytes= protocol=https
I already try some solution in another forum but not solved
This is my package json
"scripts": {
"start": "node server.js --production",
"heroku-postbuild": "npm run build",
"test": "node ace test",
"dev": "node server.js",
"build": "next build ./next",
"export": "next export ./next"
},
I already look in another but maybe not same implement with my project, any solution?
Do you have the ENV_SILENT parameter in the heroku variables?
Have a nice day
If .env file is missing, AdonisJs throws an exception by default. However, you turn off the exception as follows
somewhere in your code, you are trying to open the .env file. so generate an error.
You can disable .env file and directly use your system environment variables visit this page for more information

Issues deploying node / react / redux app to heroku

So I'm having some issues with pushing my app to heroku. Locally it runs and builds fine but it crashes when I try to deploy on heroku. Here's the log I'm seeing after deploying to heroku:
2017-05-18T16:56:47.252771+00:00 app[web.1]: npm ERR! If you do, this is most likely a problem with the pluralsight-redux-starter package,
2017-05-18T16:56:47.252849+00:00 app[web.1]: npm ERR! not with npm itself.
2017-05-18T16:56:47.252939+00:00 app[web.1]: npm ERR! Tell the author that this fails on your system:
2017-05-18T16:56:47.253015+00:00 app[web.1]: npm ERR! npm run build:html
2017-05-18T16:56:47.253089+00:00 app[web.1]: npm ERR! You can get information on how to open an issue for this project with:
2017-05-18T16:56:47.253159+00:00 app[web.1]: npm ERR! npm bugs pluralsight-redux-starter
2017-05-18T16:56:47.253227+00:00 app[web.1]: npm ERR! Or if that isn't available, you can get their info via:
2017-05-18T16:56:47.253304+00:00 app[web.1]: npm ERR! npm owner ls pluralsight-redux-starter
2017-05-18T16:56:47.253382+00:00 app[web.1]: npm ERR! There is likely additional logging output above.
2017-05-18T16:56:47.256870+00:00 app[web.1]:
2017-05-18T16:56:47.257025+00:00 app[web.1]: npm ERR! Please include the following file with any support request:
2017-05-18T16:56:47.257079+00:00 app[web.1]: npm ERR! /app/npm-debug.log
2017-05-18T16:56:47.345310+00:00 heroku[web.1]: State changed from starting to crashed
2017-05-18T16:56:47.336090+00:00 heroku[web.1]: Process exited with status 1
2017-05-18T16:55:58.000000+00:00 app[api]: Build succeeded
2017-05-18T16:59:46.000000+00:00 app[api]: Build started by user dgravelle54#gmail.com
2017-05-18T17:00:08.286603+00:00 app[api]: Release v4 created by user dgravelle54#gmail.com
2017-05-18T17:00:08.286603+00:00 app[api]: Deploy 8f4c395a by user dgravelle54#gmail.com
2017-05-18T17:00:08.618011+00:00 heroku[web.1]: State changed from crashed to starting
2017-05-18T16:59:46.000000+00:00 app[api]: Build succeeded
2017-05-18T17:00:11.772019+00:00 heroku[web.1]: Starting process with command `npm run build`
2017-05-18T17:00:14.380808+00:00 app[web.1]:
2017-05-18T17:00:14.380822+00:00 app[web.1]: > pluralsight-redux-starter#1.0.0 prebuild /app
2017-05-18T17:00:14.380823+00:00 app[web.1]: > npm run build:html
2017-05-18T17:00:14.380823+00:00 app[web.1]:
2017-05-18T17:00:15.182395+00:00 app[web.1]:
2017-05-18T17:00:15.182406+00:00 app[web.1]: > pluralsight-redux-starter#1.0.0 build:html /app
2017-05-18T17:00:15.182407+00:00 app[web.1]: > babel-node tools/buildHtml.js
2017-05-18T17:00:15.182408+00:00 app[web.1]:
2017-05-18T17:00:16.180115+00:00 app[web.1]: /app/node_modules/babel-core/lib/transformation/file/logger.js:41
2017-05-18T17:00:16.180126+00:00 app[web.1]: throw new Constructor(this._buildMessage(msg));
2017-05-18T17:00:16.180127+00:00 app[web.1]: ^
2017-05-18T17:00:16.180128+00:00 app[web.1]:
2017-05-18T17:00:16.180129+00:00 app[web.1]: ReferenceError: [BABEL] /app/tools/buildHtml.js: Unknown option: base.Children. Check out http://babeljs.io/docs/usage/options/ for more information about options.
2017-05-18T17:00:16.180131+00:00 app[web.1]: A common cause of this error is the presence of a configuration options object without the corresponding preset name. Example:
2017-05-18T17:00:16.180131+00:00 app[web.1]:
2017-05-18T17:00:16.180129+00:00 app[web.1]:
2017-05-18T17:00:16.180132+00:00 app[web.1]: Invalid:
2017-05-18T17:00:16.180133+00:00 app[web.1]: `{ presets: [{option: value}] }`
2017-05-18T17:00:16.180134+00:00 app[web.1]: Valid:
2017-05-18T17:00:16.180134+00:00 app[web.1]: `{ presets: [['presetName', {option: value}]] }`
2017-05-18T17:00:16.180135+00:00 app[web.1]:
2017-05-18T17:00:16.180137+00:00 app[web.1]: at Logger.error (/app/node_modules/babel-core/lib/transformation/file/logger.js:41:11)
2017-05-18T17:00:16.180136+00:00 app[web.1]: For more detailed information on preset configuration, please see http://babeljs.io/docs/plugins/#pluginpresets-options.
2017-05-18T17:00:16.180137+00:00 app[web.1]: at OptionManager.mergeOptions (/app/node_modules/babel-core/lib/transformation/file/options/option-manager.js:226:20)
2017-05-18T17:00:16.180138+00:00 app[web.1]: at OptionManager.init (/app/node_modules/babel-core/lib/transformation/file/options/option-manager.js:368:12)
2017-05-18T17:00:16.180139+00:00 app[web.1]: at File.initOptions (/app/node_modules/babel-core/lib/transformation/file/index.js:212:65)
2017-05-18T17:00:16.180140+00:00 app[web.1]: at new File (/app/node_modules/babel-core/lib/transformation/file/index.js:135:24)
2017-05-18T17:00:16.180141+00:00 app[web.1]: at Pipeline.transform (/app/node_modules/babel-core/lib/transformation/pipeline.js:46:16)
2017-05-18T17:00:16.180142+00:00 app[web.1]: at compile (/app/node_modules/babel-register/lib/node.js:118:20)
2017-05-18T17:00:16.180142+00:00 app[web.1]: at loader (/app/node_modules/babel-register/lib/node.js:144:14)
2017-05-18T17:00:16.180143+00:00 app[web.1]: at Object.require.extensions.(anonymous function) [as .js] (/app/node_modules/babel-register/lib/node.js:154:7)
2017-05-18T17:00:16.180141+00:00 app[web.1]: at Object.transformFileSync (/app/node_modules/babel-core/lib/api/node.js:152:10)
2017-05-18T17:00:16.204296+00:00 app[web.1]: npm ERR! argv "/app/.heroku/node/bin/node" "/app/.heroku/node/bin/npm" "run" "build:html"
2017-05-18T17:00:16.204685+00:00 app[web.1]: npm ERR! npm v3.10.10
2017-05-18T17:00:16.204883+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2017-05-18T17:00:16.193941+00:00 app[web.1]:
2017-05-18T17:00:16.205084+00:00 app[web.1]: npm ERR! pluralsight-redux-starter#1.0.0 build:html: `babel-node tools/buildHtml.js`
2017-05-18T17:00:16.204007+00:00 app[web.1]: npm ERR! Linux 3.13.0-112-generic
2017-05-18T17:00:16.204494+00:00 app[web.1]: npm ERR! node v6.10.3
2017-05-18T17:00:16.205216+00:00 app[web.1]: npm ERR! Exit status 1
2017-05-18T17:00:16.205385+00:00 app[web.1]: npm ERR!
2017-05-18T17:00:16.205521+00:00 app[web.1]: npm ERR! Failed at the pluralsight-redux-starter#1.0.0 build:html script 'babel-node tools/buildHtml.js'.
2017-05-18T17:00:16.205654+00:00 app[web.1]: npm ERR! Make sure you have the latest version of node.js and npm installed.
2017-05-18T17:00:16.205790+00:00 app[web.1]: npm ERR! If you do, this is most likely a problem with the pluralsight-redux-starter package,
2017-05-18T17:00:16.205926+00:00 app[web.1]: npm ERR! not with npm itself.
2017-05-18T17:00:16.206069+00:00 app[web.1]: npm ERR! Tell the author that this fails on your system:
2017-05-18T17:00:16.206205+00:00 app[web.1]: npm ERR! babel-node tools/buildHtml.js
2017-05-18T17:00:16.206343+00:00 app[web.1]: npm ERR! You can get information on how to open an issue for this project with:
2017-05-18T17:00:16.206474+00:00 app[web.1]: npm ERR! npm bugs pluralsight-redux-starter
2017-05-18T17:00:16.206616+00:00 app[web.1]: npm ERR! Or if that isn't available, you can get their info via:
2017-05-18T17:00:16.206746+00:00 app[web.1]: npm ERR! npm owner ls pluralsight-redux-starter
2017-05-18T17:00:16.206883+00:00 app[web.1]: npm ERR! There is likely additional logging output above.
2017-05-18T17:00:16.210443+00:00 app[web.1]:
2017-05-18T17:00:16.210851+00:00 app[web.1]: npm ERR! Please include the following file with any support request:
2017-05-18T17:00:16.210971+00:00 app[web.1]: npm ERR! /app/npm-debug.log
2017-05-18T17:00:16.222137+00:00 app[web.1]:
2017-05-18T17:00:16.229747+00:00 app[web.1]: npm ERR! Linux 3.13.0-112-generic
2017-05-18T17:00:16.230016+00:00 app[web.1]: npm ERR! argv "/app/.heroku/node/bin/node" "/app/.heroku/node/bin/npm" "run" "build"
2017-05-18T17:00:16.230230+00:00 app[web.1]: npm ERR! node v6.10.3
2017-05-18T17:00:16.230422+00:00 app[web.1]: npm ERR! npm v3.10.10
2017-05-18T17:00:16.230611+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2017-05-18T17:00:16.230764+00:00 app[web.1]: npm ERR! pluralsight-redux-starter#1.0.0 prebuild: `npm run build:html`
2017-05-18T17:00:16.230889+00:00 app[web.1]: npm ERR! Exit status 1
2017-05-18T17:00:16.231035+00:00 app[web.1]: npm ERR!
2017-05-18T17:00:16.231171+00:00 app[web.1]: npm ERR! Failed at the pluralsight-redux-starter#1.0.0 prebuild script 'npm run build:html'.
2017-05-18T17:00:16.231297+00:00 app[web.1]: npm ERR! Make sure you have the latest version of node.js and npm installed.
2017-05-18T17:00:16.231428+00:00 app[web.1]: npm ERR! If you do, this is most likely a problem with the pluralsight-redux-starter package,
2017-05-18T17:00:16.231554+00:00 app[web.1]: npm ERR! not with npm itself.
2017-05-18T17:00:16.231697+00:00 app[web.1]: npm ERR! Tell the author that this fails on your system:
2017-05-18T17:00:16.231827+00:00 app[web.1]: npm ERR! npm run build:html
2017-05-18T17:00:16.231955+00:00 app[web.1]: npm ERR! You can get information on how to open an issue for this project with:
2017-05-18T17:00:16.232183+00:00 app[web.1]: npm ERR! npm bugs pluralsight-redux-starter
2017-05-18T17:00:16.232315+00:00 app[web.1]: npm ERR! Or if that isn't available, you can get their info via:
2017-05-18T17:00:16.232440+00:00 app[web.1]: npm ERR! npm owner ls pluralsight-redux-starter
2017-05-18T17:00:16.232578+00:00 app[web.1]: npm ERR! There is likely additional logging output above.
2017-05-18T17:00:16.236064+00:00 app[web.1]:
2017-05-18T17:00:16.236264+00:00 app[web.1]: npm ERR! Please include the following file with any support request:
2017-05-18T17:00:16.236373+00:00 app[web.1]: npm ERR! /app/npm-debug.log
2017-05-18T17:00:16.327400+00:00 heroku[web.1]: Process exited with status 1
2017-05-18T17:00:16.337382+00:00 heroku[web.1]: State changed from starting to crashed
Here's a link to my current repo.
https://github.com/dgravelle/magic-redux
I've gone through a bunch of iterations now trying to get this working on heroku but I've had no success. If anyone could shed some light on the issue here I'd greatly appreciate it. Thanks!
on Heroku, you are not a root administrator, it means that you don't have the write permission.
if you want to run your server on heroku, I think you can try to bundle your file in your local.

Angular-fullstack Heroku Deployment giving error

I'm new to heroku app deployment.. I did it all the steps describe in deployment process also defined all config var.. but still I'm not able to run the application .. this is the log I got from heroku.. please if anyone can tell me what am I doing wrong or missing here
also it is giving MongoError: Authentication failed though I have declare config vars in heroku for mongodb connection as MONGOLAB_URI key..
2016-12-25T11:51:14.676128+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=demo-fullstack.herokuapp.com request_id=673145a1-c8ce-4f2c-a717-b3bfe05c5b
01 fwd="116.73.192.203" dyno= connect= service= status=503 bytes=
2016-12-25T11:51:15.091210+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=demo-fullstack.herokuapp.com request_id=05f9ef8a-1d51-4f0e-addb
-1a32ca0afff2 fwd="116.73.192.203" dyno= connect= service= status=503 bytes=
2016-12-25T11:58:07.431140+00:00 heroku[web.1]: State changed from crashed to starting
2016-12-25T11:58:09.585660+00:00 heroku[web.1]: Starting process with command `npm start`
2016-12-25T11:58:11.842396+00:00 app[web.1]:
2016-12-25T11:58:11.842417+00:00 app[web.1]: > testfullstack#0.0.0 start /app
2016-12-25T11:58:11.842419+00:00 app[web.1]:
2016-12-25T11:58:11.842418+00:00 app[web.1]: > node server/app.js
2016-12-25T11:58:12.800506+00:00 app[web.1]: Express server listening on 10075, in production mode
2016-12-25T11:58:12.853885+00:00 app[web.1]: MongoDB connection error: MongoError: Authentication failed.
2016-12-25T11:58:12.870567+00:00 app[web.1]:
2016-12-25T11:58:12.877910+00:00 app[web.1]: npm ERR! Linux 3.13.0-105-generic
2016-12-25T11:58:12.877951+00:00 app[web.1]: npm ERR! argv "/app/.heroku/node/bin/node" "/app/.heroku/node/bin/npm" "start"
2016-12-25T11:58:12.878095+00:00 app[web.1]: npm ERR! node v6.9.1
2016-12-25T11:58:12.878212+00:00 app[web.1]: npm ERR! npm v3.10.8
2016-12-25T11:58:12.878334+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2016-12-25T11:58:12.878429+00:00 app[web.1]: npm ERR! testfullstack#0.0.0 start: `node server/app.js`
2016-12-25T11:58:12.878531+00:00 app[web.1]: npm ERR! Exit status 255
2016-12-25T11:58:12.878647+00:00 app[web.1]: npm ERR!
2016-12-25T11:58:12.878731+00:00 app[web.1]: npm ERR! Failed at the testfullstack#0.0.0 start script 'node server/app.js'.
2016-12-25T11:58:12.878807+00:00 app[web.1]: npm ERR! Make sure you have the latest version of node.js and npm installed.
2016-12-25T11:58:12.878873+00:00 app[web.1]: npm ERR! If you do, this is most likely a problem with the testfullstack package,
2016-12-25T11:58:12.878943+00:00 app[web.1]: npm ERR! not with npm itself.
2016-12-25T11:58:12.879039+00:00 app[web.1]: npm ERR! Tell the author that this fails on your system:
2016-12-25T11:58:12.879108+00:00 app[web.1]: npm ERR! node server/app.js
2016-12-25T11:58:12.879191+00:00 app[web.1]: npm ERR! You can get information on how to open an issue for this project with:
2016-12-25T11:58:12.879382+00:00 app[web.1]: npm ERR! npm bugs testfullstack
2016-12-25T11:58:12.879463+00:00 app[web.1]: npm ERR! Or if that isn't available, you can get their info via:
2016-12-25T11:58:12.879534+00:00 app[web.1]: npm ERR! npm owner ls testfullstack
2016-12-25T11:58:12.879649+00:00 app[web.1]: npm ERR! There is likely additional logging output above.
2016-12-25T11:58:12.883330+00:00 app[web.1]:
2016-12-25T11:58:12.883479+00:00 app[web.1]: npm ERR! Please include the following file with any support request:
2016-12-25T11:58:12.883553+00:00 app[web.1]: npm ERR! /app/npm-debug.log
2016-12-25T11:58:12.961081+00:00 heroku[web.1]: State changed from starting to crashed
2016-12-25T11:58:12.962211+00:00 heroku[web.1]: State changed from crashed to starting
2016-12-25T11:58:12.952734+00:00 heroku[web.1]: Process exited with status 1
2016-12-25T11:58:14.598687+00:00 heroku[web.1]: Starting process with command `npm start`
2016-12-25T11:58:15.646836+00:00 app[web.1]:
2016-12-25T11:58:15.646847+00:00 app[web.1]: > testfullstack#0.0.0 start /app
2016-12-25T11:58:15.646847+00:00 app[web.1]: > node server/app.js
2016-12-25T11:58:15.646848+00:00 app[web.1]:
2016-12-25T11:58:16.389173+00:00 app[web.1]: Express server listening on 38372, in production mode
2016-12-25T11:58:16.436177+00:00 app[web.1]: MongoDB connection error: MongoError: Authentication failed.
2016-12-25T11:58:16.445122+00:00 app[web.1]:
2016-12-25T11:58:16.452364+00:00 app[web.1]: npm ERR! Linux 3.13.0-105-generic
2016-12-25T11:58:16.452548+00:00 app[web.1]: npm ERR! argv "/app/.heroku/node/bin/node" "/app/.heroku/node/bin/npm" "start"
2016-12-25T11:58:16.452685+00:00 app[web.1]: npm ERR! node v6.9.1
2016-12-25T11:58:16.452807+00:00 app[web.1]: npm ERR! npm v3.10.8
2016-12-25T11:58:16.452925+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2016-12-25T11:58:16.453022+00:00 app[web.1]: npm ERR! testfullstack#0.0.0 start: `node server/app.js`
2016-12-25T11:58:16.453103+00:00 app[web.1]: npm ERR! Exit status 255
2016-12-25T11:58:16.453195+00:00 app[web.1]: npm ERR!
2016-12-25T11:58:16.453276+00:00 app[web.1]: npm ERR! Failed at the testfullstack#0.0.0 start script 'node server/app.js'.
2016-12-25T11:58:16.453355+00:00 app[web.1]: npm ERR! Make sure you have the latest version of node.js and npm installed.
2016-12-25T11:58:16.453433+00:00 app[web.1]: npm ERR! If you do, this is most likely a problem with the testfullstack package,
2016-12-25T11:58:16.453512+00:00 app[web.1]: npm ERR! not with npm itself.
2016-12-25T11:58:16.453601+00:00 app[web.1]: npm ERR! Tell the author that this fails on your system:
2016-12-25T11:58:16.453679+00:00 app[web.1]: npm ERR! node server/app.js
2016-12-25T11:58:16.453762+00:00 app[web.1]: npm ERR! You can get information on how to open an issue for this project with:
2016-12-25T11:58:16.453840+00:00 app[web.1]: npm ERR! npm bugs testfullstack
2016-12-25T11:58:16.454017+00:00 app[web.1]: npm ERR! Or if that isn't available, you can get their info via:
2016-12-25T11:58:16.454098+00:00 app[web.1]: npm ERR! npm owner ls testfullstack
2016-12-25T11:58:16.454176+00:00 app[web.1]: npm ERR! There is likely additional logging output above.
2016-12-25T11:58:16.457449+00:00 app[web.1]:
2016-12-25T11:58:16.457596+00:00 app[web.1]: npm ERR! Please include the following file with any support request:
2016-12-25T11:58:16.457665+00:00 app[web.1]: npm ERR! /app/npm-debug.log
2016-12-25T11:58:16.520594+00:00 heroku[web.1]: State changed from starting to crashed
2016-12-25T11:58:16.492087+00:00 heroku[web.1]: Process exited with status 1
2016-12-25T12:20:14.300271+00:00 heroku[web.1]: State changed from crashed to starting
2016-12-25T12:20:16.246959+00:00 heroku[web.1]: Starting process with command `npm start`
2016-12-25T12:20:18.706498+00:00 app[web.1]:
2016-12-25T12:20:18.706509+00:00 app[web.1]: > testfullstack#0.0.0 start /app
2016-12-25T12:20:18.706510+00:00 app[web.1]: > node server/app.js
2016-12-25T12:20:18.706511+00:00 app[web.1]:
2016-12-25T12:20:19.622220+00:00 app[web.1]: Express server listening on 28155, in production mode
2016-12-25T12:20:19.710471+00:00 app[web.1]: MongoDB connection error: MongoError: Authentication failed.
2016-12-25T12:20:19.726340+00:00 app[web.1]:
2016-12-25T12:20:19.738178+00:00 app[web.1]: npm ERR! Linux 3.13.0-105-generic
2016-12-25T12:20:19.738427+00:00 app[web.1]: npm ERR! argv "/app/.heroku/node/bin/node" "/app/.heroku/node/bin/npm" "start"
2016-12-25T12:20:19.738641+00:00 app[web.1]: npm ERR! node v6.9.1
2016-12-25T12:20:19.738825+00:00 app[web.1]: npm ERR! npm v3.10.8
2016-12-25T12:20:19.739011+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2016-12-25T12:20:19.739166+00:00 app[web.1]: npm ERR! testfullstack#0.0.0 start: `node server/app.js`
2016-12-25T12:20:19.739573+00:00 app[web.1]: npm ERR! Failed at the testfullstack#0.0.0 start script 'node server/app.js'.
2016-12-25T12:20:19.739294+00:00 app[web.1]: npm ERR! Exit status 255
2016-12-25T12:20:19.739443+00:00 app[web.1]: npm ERR!
2016-12-25T12:20:19.739697+00:00 app[web.1]: npm ERR! Make sure you have the latest version of node.js and npm installed.
2016-12-25T12:20:19.739824+00:00 app[web.1]: npm ERR! If you do, this is most likely a problem with the testfullstack package,
2016-12-25T12:20:19.740093+00:00 app[web.1]: npm ERR! Tell the author that this fails on your system:
2016-12-25T12:20:19.739951+00:00 app[web.1]: npm ERR! not with npm itself.
2016-12-25T12:20:19.740222+00:00 app[web.1]: npm ERR! node server/app.js
2016-12-25T12:20:19.740362+00:00 app[web.1]: npm ERR! You can get information on how to open an issue for this project with:
2016-12-25T12:20:19.740452+00:00 app[web.1]: npm ERR! npm bugs testfullstack
2016-12-25T12:20:19.740570+00:00 app[web.1]: npm ERR! Or if that isn't available, you can get their info via:
2016-12-25T12:20:19.740700+00:00 app[web.1]: npm ERR! npm owner ls testfullstack
2016-12-25T12:20:19.741006+00:00 app[web.1]: npm ERR! There is likely additional logging output above.
2016-12-25T12:20:19.746333+00:00 app[web.1]:
2016-12-25T12:20:19.746571+00:00 app[web.1]: npm ERR! Please include the following file with any support request:
2016-12-25T12:20:19.746693+00:00 app[web.1]: npm ERR! /app/npm-debug.log
2016-12-25T12:20:19.818450+00:00 heroku[web.1]: Process exited with status 1
2016-12-25T12:20:19.827787+00:00 heroku[web.1]: State changed from starting to crashed

Deploying on Heroku using Node.js application fails

I'm following the book Getting MEAN with Mongo, Express, Angular and Node.js and I'm trying to deploy my application to Heroku. I already did it but can't access the live URL, cause I get an application error. I don't know what is happening and why it didn't work, I followed all the concepts in the book.
Here is the tail log from the cmd
2016-10-11T19:51:45.814527+00:00 heroku[api]: Deploy d98fd8a by filipecosta_10#h
otmail.com
2016-10-11T19:51:45.814527+00:00 heroku[api]: Release v3 created by filipecosta_
10#hotmail.com
2016-10-11T19:51:47.335153+00:00 heroku[slug-compiler]: Slug compilation started
2016-10-11T19:51:47.335158+00:00 heroku[slug-compiler]: Slug compilation finishe
d
2016-10-11T19:51:48.026456+00:00 heroku[web.1]: Starting process with command `n
pm start`
2016-10-11T19:51:50.965855+00:00 app[web.1]:
2016-10-11T19:51:50.965871+00:00 app[web.1]: > loc8r#0.0.0 start /app
2016-10-11T19:51:50.965872+00:00 app[web.1]: > node ./bin/www
2016-10-11T19:51:50.965873+00:00 app[web.1]:
2016-10-11T19:51:51.158696+00:00 app[web.1]: module.js:327
2016-10-11T19:51:51.158699+00:00 app[web.1]: throw err;
2016-10-11T19:51:51.158699+00:00 app[web.1]: ^
2016-10-11T19:51:51.158700+00:00 app[web.1]:
2016-10-11T19:51:51.158701+00:00 app[web.1]: Error: Cannot find module '../contr
ollers/main'
2016-10-11T19:51:51.158702+00:00 app[web.1]: at Function.Module._resolveFile
name (module.js:325:15)
2016-10-11T19:51:51.158703+00:00 app[web.1]: at Function.Module._load (modul
e.js:276:25)
2016-10-11T19:51:51.158703+00:00 app[web.1]: at Module.require (module.js:35
3:17)
2016-10-11T19:51:51.158704+00:00 app[web.1]: at require (internal/module.js:
12:17)
2016-10-11T19:51:51.158705+00:00 app[web.1]: at Object.<anonymous> (/app/app
_server/routes/index.js:3:17)
2016-10-11T19:51:51.158705+00:00 app[web.1]: at Module._compile (module.js:4
09:26)
2016-10-11T19:51:51.158706+00:00 app[web.1]: at Object.Module._extensions..j
s (module.js:416:10)
2016-10-11T19:51:51.158706+00:00 app[web.1]: at Module.load (module.js:343:3
2)
2016-10-11T19:51:51.158707+00:00 app[web.1]: at Function.Module._load (modul
e.js:300:12)
2016-10-11T19:51:51.158708+00:00 app[web.1]: at Module.require (module.js:35
3:17)
2016-10-11T19:51:51.167422+00:00 app[web.1]:
2016-10-11T19:51:51.174247+00:00 app[web.1]: npm ERR! argv "/app/.heroku/node/bi
n/node" "/app/.heroku/node/bin/npm" "start"
2016-10-11T19:51:51.173815+00:00 app[web.1]: npm ERR! Linux 3.13.0-95-generic
2016-10-11T19:51:51.174531+00:00 app[web.1]: npm ERR! node v4.5.0
2016-10-11T19:51:51.174888+00:00 app[web.1]: npm ERR! npm v2.15.11
2016-10-11T19:51:51.175128+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2016-10-11T19:51:51.175398+00:00 app[web.1]: npm ERR! loc8r#0.0.0 start: `node .
/bin/www`
2016-10-11T19:51:51.175544+00:00 app[web.1]: npm ERR! Exit status 1
2016-10-11T19:51:51.175660+00:00 app[web.1]: npm ERR!
2016-10-11T19:51:51.175761+00:00 app[web.1]: npm ERR! Failed at the loc8r#0.0.0
start script 'node ./bin/www'.
2016-10-11T19:51:51.175878+00:00 app[web.1]: npm ERR! This is most likely a prob
lem with the loc8r package,
2016-10-11T19:51:51.176070+00:00 app[web.1]: npm ERR! Tell the author that this
fails on your system:
2016-10-11T19:51:51.176164+00:00 app[web.1]: npm ERR! node ./bin/www
2016-10-11T19:51:51.176253+00:00 app[web.1]: npm ERR! You can get information on
how to open an issue for this project with:
2016-10-11T19:51:51.175977+00:00 app[web.1]: npm ERR! not with npm itself.
2016-10-11T19:51:51.176393+00:00 app[web.1]: npm ERR! npm bugs loc8r
2016-10-11T19:51:51.176495+00:00 app[web.1]: npm ERR! Or if that isn't available
, you can get their info via:
2016-10-11T19:51:51.176593+00:00 app[web.1]: npm ERR!
2016-10-11T19:51:51.176685+00:00 app[web.1]: npm ERR! npm owner ls loc8r
2016-10-11T19:51:51.176781+00:00 app[web.1]: npm ERR! There is likely additional
logging output above.
2016-10-11T19:51:51.180051+00:00 app[web.1]:
2016-10-11T19:51:51.180327+00:00 app[web.1]: npm ERR! /app/npm-debug.log
2016-10-11T19:51:51.180221+00:00 app[web.1]: npm ERR! Please include the followi
ng file with any support request:
2016-10-11T19:51:51.279651+00:00 heroku[web.1]: State changed from starting to c
rashed
2016-10-11T19:51:51.280869+00:00 heroku[web.1]: State changed from crashed to st
arting
2016-10-11T19:51:51.268892+00:00 heroku[web.1]: Process exited with status 1
2016-10-11T19:51:52.894691+00:00 heroku[web.1]: Starting process with command `n
pm start`
2016-10-11T19:51:55.200670+00:00 app[web.1]:
2016-10-11T19:51:55.200685+00:00 app[web.1]: > loc8r#0.0.0 start /app
2016-10-11T19:51:55.200685+00:00 app[web.1]: > node ./bin/www
2016-10-11T19:51:55.200686+00:00 app[web.1]:
2016-10-11T19:51:55.471950+00:00 app[web.1]: module.js:327
2016-10-11T19:51:55.471963+00:00 app[web.1]: throw err;
2016-10-11T19:51:55.471963+00:00 app[web.1]: ^
2016-10-11T19:51:55.471967+00:00 app[web.1]:
2016-10-11T19:51:55.471967+00:00 app[web.1]: Error: Cannot find module '../contr
ollers/main'
2016-10-11T19:51:55.471968+00:00 app[web.1]: at Function.Module._resolveFile
name (module.js:325:15)
2016-10-11T19:51:55.471968+00:00 app[web.1]: at Function.Module._load (modul
e.js:276:25)
2016-10-11T19:51:55.471969+00:00 app[web.1]: at Module.require (module.js:35
3:17)
2016-10-11T19:51:55.471969+00:00 app[web.1]: at require (internal/module.js:
12:17)
2016-10-11T19:51:55.471970+00:00 app[web.1]: at Object.<anonymous> (/app/app
_server/routes/index.js:3:17)
2016-10-11T19:51:55.471971+00:00 app[web.1]: at Module._compile (module.js:4
09:26)
2016-10-11T19:51:55.471971+00:00 app[web.1]: at Object.Module._extensions..j
s (module.js:416:10)
2016-10-11T19:51:55.471972+00:00 app[web.1]: at Module.load (module.js:343:3
2)
2016-10-11T19:51:55.471972+00:00 app[web.1]: at Function.Module._load (modul
e.js:300:12)
2016-10-11T19:51:55.471973+00:00 app[web.1]: at Module.require (module.js:35
3:17)
2016-10-11T19:51:55.481097+00:00 app[web.1]:
2016-10-11T19:51:55.487850+00:00 app[web.1]: npm ERR! Linux 3.13.0-95-generic
2016-10-11T19:51:55.488249+00:00 app[web.1]: npm ERR! argv "/app/.heroku/node/bi
n/node" "/app/.heroku/node/bin/npm" "start"
2016-10-11T19:51:55.489769+00:00 app[web.1]: npm ERR! node v4.5.0
2016-10-11T19:51:55.489771+00:00 app[web.1]: npm ERR! npm v2.15.11
2016-10-11T19:51:55.489771+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2016-10-11T19:51:55.489772+00:00 app[web.1]: npm ERR! loc8r#0.0.0 start: `node .
/bin/www`
2016-10-11T19:51:55.489773+00:00 app[web.1]: npm ERR! Exit status 1
2016-10-11T19:51:55.489897+00:00 app[web.1]: npm ERR!
2016-10-11T19:51:55.490059+00:00 app[web.1]: npm ERR! Failed at the loc8r#0.0.0
start script 'node ./bin/www'.
2016-10-11T19:51:55.490228+00:00 app[web.1]: npm ERR! This is most likely a prob
lem with the loc8r package,
2016-10-11T19:51:55.490384+00:00 app[web.1]: npm ERR! not with npm itself.
2016-10-11T19:51:55.490534+00:00 app[web.1]: npm ERR! Tell the author that this
fails on your system:
2016-10-11T19:51:55.490692+00:00 app[web.1]: npm ERR! node ./bin/www
2016-10-11T19:51:55.490844+00:00 app[web.1]: npm ERR! You can get information on
how to open an issue for this project with:
2016-10-11T19:51:55.491004+00:00 app[web.1]: npm ERR! npm bugs loc8r
2016-10-11T19:51:55.491156+00:00 app[web.1]: npm ERR! Or if that isn't available
, you can get their info via:
2016-10-11T19:51:55.491308+00:00 app[web.1]: npm ERR!
2016-10-11T19:51:55.491457+00:00 app[web.1]: npm ERR! npm owner ls loc8r
2016-10-11T19:51:55.491613+00:00 app[web.1]: npm ERR! There is likely additional
logging output above.
2016-10-11T19:51:55.495210+00:00 app[web.1]:
2016-10-11T19:51:55.495590+00:00 app[web.1]: npm ERR! /app/npm-debug.log
2016-10-11T19:51:55.495442+00:00 app[web.1]: npm ERR! Please include the followi
ng file with any support request:
2016-10-11T19:51:55.601435+00:00 heroku[web.1]: State changed from starting to c
rashed
2016-10-11T19:51:55.580900+00:00 heroku[web.1]: Process exited with status 1
2016-10-11T19:57:39.619644+00:00 heroku[router]: at=error code=H10 desc="App cra
shed" method=GET path="/" host=fast-plains-12113.herokuapp.com request_id=6d440a
4e-993d-4676-ae41-939426ff1ffd fwd="2.83.58.24" dyno= connect= service= status=5
03 bytes=
2016-10-11T19:57:40.240525+00:00 heroku[router]: at=error code=H10 desc="App cra
shed" method=GET path="/favicon.ico" host=fast-plains-12113.herokuapp.com reques
t_id=c5caca51-92c0-4532-b56c-6f060cd39634 fwd="2.83.58.24" dyno= connect= servic
e= status=503 bytes=
2016-10-11T20:00:42.624338+00:00 heroku[router]: at=error code=H10 desc="App cra
shed" method=GET path="/" host=fast-plains-12113.herokuapp.com request_id=ef7dc9
6d-920b-4a4c-ae7a-9ccb584b1682 fwd="2.83.58.24" dyno= connect= service= status=5
03 bytes=
2016-10-11T20:00:42.771815+00:00 heroku[router]: at=error code=H10 desc="App cra
shed" method=GET path="/favicon.ico" host=fast-plains-12113.herokuapp.com reques
t_id=50598f55-4a3e-4b30-ac54-e77a722fb839 fwd="2.83.58.24" dyno= connect= servic
e= status=503 bytes=
2016-10-11T20:03:25.808113+00:00 heroku[router]: at=error code=H10 desc="App cra
shed" method=GET path="/" host=fast-plains-12113.herokuapp.com request_id=9e2da8
b4-e936-4812-93a7-378ec78606f8 fwd="2.83.58.24" dyno= connect= service= status=5
03 bytes=
2016-10-11T20:03:25.961352+00:00 heroku[router]: at=error code=H10 desc="App cra
shed" method=GET path="/favicon.ico" host=fast-plains-12113.herokuapp.com reques
t_id=5d95a945-dcfa-4248-981d-11ce2f764b56 fwd="2.83.58.24" dyno= connect= servic
e= status=503 bytes=

Resources