While deploying to heroku , I am getting the following error log - node.js

I have used Postgresql add-on and NodeJS framework.In .gitignore file , I have already added npm-debug.log.
2016-09-07T23:35:01.785651+00:00 app[web.1]: npm ERR! node server.js
2016-09-07T23:35:01.785817+00:00 app[web.1]: npm ERR! You can get their info via:
2016-09-07T23:35:01.785982+00:00 app[web.1]: npm ERR! npm owner ls version3
2016-09-07T23:35:01.789051+00:00 app[web.1]:
2016-09-07T23:35:01.789307+00:00 app[web.1]: npm ERR! Please include the following file with any support request:
2016-09-07T23:35:01.789464+00:00 app[web.1]: npm ERR! /app/npm-debug.log
2016-09-07T23:35:01.888595+00:00 heroku[web.1]: State changed from starting to crashed
2016-09-07T23:35:01.878834+00:00 heroku[web.1]: Process exited with status 1

Do you have all dependencies listed in your package.json file?
To add a library to package.json,
npm install<libName> --save

Related

Need help deploying full stack website to heroku: Error: There is likely additional logging output above

I'm pretty new to fullstack development and have been trying to upload my site on heroku, I get this error message and I'm guessing it has something to do with my package-lock.json file in the root folder.
I have both front end and back end folders under one parent folder.
Here is the link to the small project if you can check it out: https://github.com/manuelmort/tft-project
I usually upload some small sites to gh-pages but since they dont support server side code I have to use heroku. It builds succesfully but the site never starts because of the error message below on heroku CLI
2022-01-04T16:23:14.000000+00:00 app[api]: Build started by user manuelmort#gmail.com
2022-01-04T16:24:54.111750+00:00 app[api]: Deploy 8cc070c4 by user manuelmort#gmail.com
2022-01-04T16:24:54.111750+00:00 app[api]: Release v13 created by user manuelmort#gmail.com
2022-01-04T16:24:57.562224+00:00 heroku[web.1]: State changed from crashed to starting
2022-01-04T16:25:02.000000+00:00 app[api]: Build succeeded
2022-01-04T16:25:04.610196+00:00 heroku[web.1]: Starting process with command `npm start`
2022-01-04T16:25:07.018112+00:00 app[web.1]:
2022-01-04T16:25:07.018129+00:00 app[web.1]: > tft-project#1.0.0 start /app
2022-01-04T16:25:07.018130+00:00 app[web.1]: > concurrently "npm run backend" "npm run client"
2022-01-04T16:25:07.018130+00:00 app[web.1]:
2022-01-04T16:25:07.022660+00:00 app[web.1]: sh: 1: concurrently: not found
2022-01-04T16:25:07.028749+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2022-01-04T16:25:07.028977+00:00 app[web.1]: npm ERR! syscall spawn
2022-01-04T16:25:07.029095+00:00 app[web.1]: npm ERR! file sh
2022-01-04T16:25:07.029286+00:00 app[web.1]: npm ERR! errno ENOENT
2022-01-04T16:25:07.034404+00:00 app[web.1]: npm ERR! tft-project#1.0.0 start: `concurrently "npm run backend""npm run client"`
2022-01-04T16:25:07.034446+00:00 app[web.1]: npm ERR! spawn ENOENT
2022-01-04T16:25:07.034492+00:00 app[web.1]: npm ERR!
2022-01-04T16:25:07.034537+00:00 app[web.1]: npm ERR! Failed at the tft-project#1.0.0 start script.
2022-01-04T16:25:07.034580+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likelyadditional logging output above.
2022-01-04T16:25:07.040214+00:00 app[web.1]:
2022-01-04T16:25:07.040320+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2022-01-04T16:25:07.040356+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2022-01-04T16_25_07_034Z-debug.log
2022-01-04T16:25:07.238236+00:00 heroku[web.1]: Process exited with status 1
2022-01-04T16:25:07.301484+00:00 heroku[web.1]: State changed from starting to crashed
2022-01-04T16:25:07.307500+00:00 heroku[web.1]: State changed from crashed to starting
2022-01-04T16:25:15.521992+00:00 heroku[web.1]: Starting process with command `npm start`
2022-01-04T16:25:17.284061+00:00 app[web.1]:
2022-01-04T16:25:17.284072+00:00 app[web.1]: > tft-project#1.0.0 start /app
2022-01-04T16:25:17.284073+00:00 app[web.1]: > concurrently "npm run backend" "npm run client"
2022-01-04T16:25:17.284073+00:00 app[web.1]:
2022-01-04T16:25:17.298996+00:00 app[web.1]: sh: 1: concurrently: not found
2022-01-04T16:25:17.316611+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2022-01-04T16:25:17.317012+00:00 app[web.1]: npm ERR! syscall spawn
2022-01-04T16:25:17.317189+00:00 app[web.1]: npm ERR! file sh
2022-01-04T16:25:17.317369+00:00 app[web.1]: npm ERR! errno ENOENT
2022-01-04T16:25:17.337279+00:00 app[web.1]: npm ERR! tft-project#1.0.0 start: `concurrently "npm run backend""npm run client"`
2022-01-04T16:25:17.337583+00:00 app[web.1]: npm ERR! spawn ENOENT
2022-01-04T16:25:17.337807+00:00 app[web.1]: npm ERR!
2022-01-04T16:25:17.337920+00:00 app[web.1]: npm ERR! Failed at the tft-project#1.0.0 start script.
2022-01-04T16:25:17.338041+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likelyadditional logging output above.
2022-01-04T16:25:17.347983+00:00 app[web.1]:
2022-01-04T16:25:17.350592+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2022-01-04T16:25:17.350682+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2022-01-04T16_25_17_338Z-debug.log
2022-01-04T16:25:17.534240+00:00 heroku[web.1]: Process exited with status 1
2022-01-04T16:25:17.755577+00:00 heroku[web.1]: State changed from starting to crashed
Any help would be much appreciated!
Turns out I needed to have concurrently under dependencies and not devDependecies branch in my package.json file,
I don't get the error anymore

How to fix npm ERR! code ELIFECYCLE when deploying MEAN app to Heroku

I'm having an issue deploying my backend to Heroku. I'm using the MEAN stack with a Mongo Atlas Database. The app works fine locally. But once I deploy it, it crashes with an npm ERR! code ELIFECYCLE. Apparently, Mongo Atlas requires you to whitelist IP addresses. An article I read said it would work fine if I add my connection string to Heroku environment variables. So I've done so and saved it with the name connectionString. However, this did not work. Does the connection string need a specific name? I've posted my Heroku log below. Note I've tried deleting my node_modules and package.json and reinstalling them as well as changing my node version to 10.x.
2021-03-17T07:22:23.865572+00:00 app[api]: Deploy 2cbf3bbb by user example#example.com
2021-03-17T07:22:23.865572+00:00 app[api]: Release v9 created by user example#example.com
2021-03-17T07:22:24.515688+00:00 heroku[web.1]: State changed from crashed to starting
2021-03-17T07:22:25.000000+00:00 app[api]: Build succeeded
2021-03-17T07:22:27.638401+00:00 heroku[web.1]: Starting process with command `npm start`
2021-03-17T07:22:30.298270+00:00 app[web.1]:
2021-03-17T07:22:30.298283+00:00 app[web.1]: > backend#1.1.1 start /app
2021-03-17T07:22:30.298284+00:00 app[web.1]: > node index.js
2021-03-17T07:22:30.298284+00:00 app[web.1]:
2021-03-17T07:22:31.387500+00:00 app[web.1]: WARNING: NODE_ENV value of 'production' did not match any deployment config file names.
2021-03-17T07:22:31.387844+00:00 app[web.1]: WARNING: See https://github.com/lorenwest/node-config/wiki/Strict-Mode
2021-03-17T07:22:31.931808+00:00 heroku[web.1]: State changed from starting to up
2021-03-17T07:23:01.761238+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2021-03-17T07:23:01.761850+00:00 app[web.1]: npm ERR! errno 1
2021-03-17T07:23:01.770367+00:00 app[web.1]: npm ERR! backend#1.1.1 start: `node index.js`
2021-03-17T07:23:01.770621+00:00 app[web.1]: npm ERR! Exit status 1
2021-03-17T07:23:01.770728+00:00 app[web.1]: npm ERR!
2021-03-17T07:23:01.772482+00:00 app[web.1]: npm ERR! Failed at the backend#1.1.1 start script.
2021-03-17T07:23:01.772597+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2021-03-17T07:23:01.781656+00:00 app[web.1]:
2021-03-17T07:23:01.781807+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2021-03-17T07:23:01.781869+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2021-03-17T07_23_01_773Z-debug.log
2021-03-17T07:23:01.841833+00:00 heroku[web.1]: Process exited with status 1
2021-03-17T07:23:01.965241+00:00 heroku[web.1]: State changed from up to crashed
2021-03-17T07:23:01.973670+00:00 heroku[web.1]: State changed from crashed to starting
2021-03-17T07:23:06.945061+00:00 heroku[web.1]: Starting process with command `npm start`
2021-03-17T07:23:11.079200+00:00 app[web.1]:
2021-03-17T07:23:11.079239+00:00 app[web.1]: > backend#1.1.1 start /app
2021-03-17T07:23:11.079239+00:00 app[web.1]: > node index.js
2021-03-17T07:23:11.079239+00:00 app[web.1]:
2021-03-17T07:23:12.636407+00:00 app[web.1]: WARNING: NODE_ENV value of 'production' did not match any deployment config file names.
2021-03-17T07:23:12.639137+00:00 app[web.1]: WARNING: See https://github.com/lorenwest/node-config/wiki/Strict-Mode
2021-03-17T07:23:13.442612+00:00 heroku[web.1]: State changed from starting to up
2021-03-17T07:23:43.404828+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2021-03-17T07:23:43.405294+00:00 app[web.1]: npm ERR! errno 1
2021-03-17T07:23:43.419129+00:00 app[web.1]: npm ERR! backend#1.1.1 start: `node index.js`
2021-03-17T07:23:43.419414+00:00 app[web.1]: npm ERR! Exit status 1
2021-03-17T07:23:43.419741+00:00 app[web.1]: npm ERR!
2021-03-17T07:23:43.420082+00:00 app[web.1]: npm ERR! Failed at the backend#1.1.1 start script.
2021-03-17T07:23:43.420380+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2021-03-17T07:23:43.437105+00:00 app[web.1]:
2021-03-17T07:23:43.439175+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2021-03-17T07:23:43.439472+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2021-03-17T07_23_43_421Z-debug.log
2021-03-17T07:23:43.562438+00:00 heroku[web.1]: Process exited with status 1
2021-03-17T07:23:43.638872+00:00 heroku[web.1]: State changed from up to crashed```
So I figured out the problem. I was using the config module to load the Mongodb Atlas connection string when connecting to my database.
mongoose.connect(config.get('configurationString'), {useNewUrlParser: true, useUnifiedTopology: true, useFindAndModify: false, useCreateIndex: true}).then(() => winston.info("Connected to MongoDB..."))
I changed config.get('connectionString') to process.env.MONGODB_URL then I added the MONGODB_URL env variable to heroku using heroku config:set MONGODB_URL="<YOUR MONGODB ATLAS CONNECTION STRING>". Also make sure you have a Procfile and add the line web:node index.js

parse-server-mailgun configuration issue

I am working on an iOS app using parse-server (/Heroku) as a back-end.
I would like to implement an email-confirmation system when a user creates an account, and also allow email recovery of lost passwords.
For that I want to use mailGun. I have installed the adapter by running:
npm install --save parse-server-mailgun
I have also added this to the ParseServer configuration block.
verifyUserEmails: true,
emailAdapter: {
//module: 'parse-server-simple-mailgun-adapter',
module: '#parse/simple-mailgun-adapter',
//module: '#parse-server-mailgun',
options: {
// The address that your emails come from
fromAddress: 'me#abc.com',
// Your domain from mailgun.com
domain: 'something.com',
// Your API key from mailgun.com
apiKey: 'mykey-mykey-mykey-mykey-mykey-mykey',
}
}
But it is not working. I don't know if I forgot some important step, other than the two above. Or if my configuration is wrong. I must admit I am not confident about the line above reading:
module: '#parse/simple-mailgun-adapter',
Here is what I get when running the push:
git add . && git commit -m "update myapp" && git push heroku master
2018-03-08T09:03:3......0 app[api]: - Build started by user me
.....
2018-03-08T09:03:3......0 app[api]: Build succeeded
2018-03-08T09:03:5......0 heroku[web.1]: State changed from crashed to starting
2018-03-08T09:04:0......0 heroku[web.1]: Starting process with command `npm start`
.....
2018-03-08T09:04:0......0 app[web.1]: > node index.js
2018-03-08T09:04:0......0 app[web.1]:undefined
2018-03-08T09:04:1......0 app[web.1]:
2018-03-08T09:04:1......0 app[web.1]: /app/node_modules/parse-server/lib/Config.js:174
2018-03-08T09:04:1......0 app[web.1]: throw 'An app name is required for e-mail verification and password resets.';
2018-03-08T09:04:1......0 app[web.1]: ^
2018-03-08T09:04:1......0 app[web.1]: An app name is required for e-mail verification and password resets.
2018-03-08T09:04:1......0 app[web.1]: npm ERR! code ELIFECYCLE
2018-03-08T09:04:1......0 app[web.1]: npm ERR! errno 1
2018-03-08T09:04:1......0 app[web.1]: npm ERR! parse-server-example#1.4.0 start: `node index.js`
2018-03-08T09:04:1......0 app[web.1]: npm ERR! Exit status 1
2018-03-08T09:04:1......0 app[web.1]: npm ERR!
2018-03-08T09:04:1......0 app[web.1]: npm ERR! Failed at the parse-server-example#1.4.0 start script.
2018-03-08T09:04:1......0 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely ...
2018-03-08T09:04:1......0 app[web.1]:
2018-03-08T09:04:1......0 app[web.1]: npm ERR! A complete log of this run can be found in:
2018-03-08T09:04:1......0 app[web.1]: npm ERR! ....-debug.log
2018-03-08T09:04:1......0 heroku[web.1]: Process exited with status 1
2018-03-08T09:04:1......0 heroku[web.1]: State changed from starting to crashed
2018-03-08T09:04:1......0 heroku[web.1]: State changed from crashed to starting
2018-03-08T09:04:1......0 heroku[web.1]: Starting process with command `npm start`
2018-03-08T09:04:2......0 app[web.1]:
2018-03-08T09:04:2......0 app[web.1]: > parse-server-example#1.4.0 start /app
2018-03-08T09:04:2......0 app[web.1]: > node index.js
2018-03-08T09:04:2......0 app[web.1]:undefined
2018-03-08T09:04:2......0 app[web.1]:
2018-03-08T09:04:2......0 app[web.1]: /app/node_modules/parse-server/lib/Config.js:174
2018-03-08T09:04:2......0 app[web.1]: throw 'An app name is required for e-mail verification and password resets.';
2018-03-08T09:04:22.996195+00:00 app[web.1]: ^
2018-03-08T09:04:22.996197+00:00 app[web.1]: An app name is required for e-mail verification and password resets.
2018-03-08T09:04:23.011936+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2018-03-08T09:04:23.012286+00:00 app[web.1]: npm ERR! errno 1
2018-03-08T09:04:23.013532+00:00 app[web.1]: npm ERR! parse-server-example#1.4.0 start: `node index.js`
We can read 'An app name is required for e-mail verification and password resets.' But I am not sure where to fix that.
Beside I need to clarify that the app is working as expected, before I get into trying to install this mailGun adapter.
The error indicates appName property is not configured. It throws because the default email template references appName. There are two ways to configure appName:
If you start your parse-server with a config.json file, add it to the config.json like this:
config.json: { "allowClientClassCreation": false,
...
"appName": "my_app_name",
...
}
Alternatively, set the appName with env variable:
PARSE_SERVER_APP_NAME="my_app_name"
references:
Your best guide is the code:
https://github.com/parse-community/parse-server/blob/637326d3afcf82a4118f5ad5b316e6ae52fb5910/src/Options/Definitions.js
Documentation:
https://parseplatform.org/parse-server/api/4.5.0/#email-verification-and-password-reset
https://parseplatform.org/parse-server/api/master/ParseServerOptions.html

Heroku errors with Meteor 1.4.1.1

I was following this guide in order to deploy my app. There are no errors with my push, however when I open the app on my heroku dashboard I am met with an application error page.
This is what the logs show:
2016-09-28T16:05:56.493404+00:00 heroku[web.1]: Starting process with command `npm start`
2016-09-28T16:05:58.915131+00:00 app[web.1]:
2016-09-28T16:05:58.915154+00:00 app[web.1]: > TTR# start /app
2016-09-28T16:05:58.915155+00:00 app[web.1]: > meteor run
2016-09-28T16:05:58.915155+00:00 app[web.1]:
2016-09-28T16:05:58.920402+00:00 app[web.1]: sh: 1: meteor: not found
2016-09-28T16:05:58.928190+00:00 app[web.1]:
2016-09-28T16:05:58.938161+00:00 app[web.1]: npm ERR! Linux 3.13.0-93-generic
2016-09-28T16:05:58.938683+00:00 app[web.1]: npm ERR! argv "/app/.heroku/node/bin/node" "/app/.heroku/node/bin/npm" "start"
2016-09-28T16:05:58.939001+00:00 app[web.1]: npm ERR! node v5.11.1
2016-09-28T16:05:58.939801+00:00 app[web.1]: npm ERR! npm v3.8.6
2016-09-28T16:05:58.940297+00:00 app[web.1]: npm ERR! file sh
2016-09-28T16:05:58.940554+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2016-09-28T16:05:58.940702+00:00 app[web.1]: npm ERR! errno ENOENT
2016-09-28T16:05:58.940855+00:00 app[web.1]: npm ERR! syscall spawn
2016-09-28T16:05:58.941055+00:00 app[web.1]: npm ERR! TTR# start: `meteor run`
2016-09-28T16:05:58.941269+00:00 app[web.1]: npm ERR! spawn ENOENT
2016-09-28T16:05:58.941504+00:00 app[web.1]: npm ERR!
2016-09-28T16:05:58.941722+00:00 app[web.1]: npm ERR! Failed at the TTR# start script 'meteor run'.
2016-09-28T16:05:58.941941+00:00 app[web.1]: npm ERR! Make sure you have the latest version of node.js and npm installed.
2016-09-28T16:05:58.942090+00:00 app[web.1]: npm ERR! If you do, this is most likely a problem with the TTR package,
2016-09-28T16:05:58.942204+00:00 app[web.1]: npm ERR! not with npm itself.
2016-09-28T16:05:58.942309+00:00 app[web.1]: npm ERR! Tell the author that this fails on your system:
2016-09-28T16:05:58.942414+00:00 app[web.1]: npm ERR! meteor run
2016-09-28T16:05:58.942519+00:00 app[web.1]: npm ERR! You can get information on how to open an issue for this project with:
2016-09-28T16:05:58.942625+00:00 app[web.1]: npm ERR! npm bugs TTR
2016-09-28T16:05:58.942728+00:00 app[web.1]: npm ERR! Or if that isn't available, you can get their info via:
2016-09-28T16:05:58.942985+00:00 app[web.1]: npm ERR! npm owner ls TTR
2016-09-28T16:05:58.943094+00:00 app[web.1]: npm ERR! There is likely additional logging output above.
2016-09-28T16:05:58.946745+00:00 app[web.1]:
2016-09-28T16:05:58.947021+00:00 app[web.1]: npm ERR! Please include the following file with any support request:
2016-09-28T16:05:58.947129+00:00 app[web.1]: npm ERR! /app/npm-debug.log
2016-09-28T16:05:59.015852+00:00 heroku[web.1]: State changed from starting to crashed
2016-09-28T16:05:59.001860+00:00 heroku[web.1]: Process exited with status 1
I have tried both the https://github.com/AdmitHub/meteor-buildpack-horse.git and https://github.com/jordansissel/heroku-buildpack-meteor.git buildpacks. Any ideas what I could try to get this running?
Hope I will helps.
That is the guide I used to do it, and every things was Ok for me:
https://medium.com/#leonardykris/how-to-run-a-meteor-js-application-on-heroku-in-10-steps-7aceb12de234
With this buildpack(https://github.com/dassiorleando/heroku-buildpack-meteor), I forked from (https://github.com/jordansissel/heroku-buildpack-meteor) and edit the node engine version to allow me to deploy my app made with the new version of meteor(1.4.X.X).
If it was helpful, just mark it as the best answer, if not give us for example a github repository with a simple version of the app you want to deploy on heroku, then we will try to do it and better figure out what is wrong.
To get meteor to deploy on Heroku I had to use https://github.com/AdmitHub/meteor-buildpack-horse.git#beta for my buildpack and update meteor to 1.4.2.3
I had this issue and I had to edit the "name" package.json to match the name of the app on heroku. This is why it is recommended that you use the same name of the app when you run "meteor create" when you create the app via Heroku (either command line or in the Heroku Console)

Heroku Log "npm err"

I deployed an app to heroku, which worked, but when I go to the link, I get an application error. When I go to the heroku logs in my console, this is what I see:
2015-05-11T21:35:28.450778+00:00 app[web.1]: npm ERR!
2015-05-11T21:35:28.451031+00:00 app[web.1]: npm ERR! Failed at the showtrackr#0.0.0 start script 'node ./bin/www'.
2015-05-11T21:35:28.458702+00:00 app[web.1]: npm ERR! Tell the author that this fails on your system:
2015-05-11T21:35:28.451298+00:00 app[web.1]: npm ERR! This is most likely a problem with the showtrackr package,
2015-05-11T21:35:28.470607+00:00 app[web.1]:
2015-05-11T21:35:28.448240+00:00 app[web.1]: npm ERR! Linux 3.13.0-49-generic
2015-05-11T21:35:28.471022+00:00 app[web.1]: npm ERR! Please include the following file with any support request:
2015-05-11T21:35:28.458465+00:00 app[web.1]: npm ERR! not with npm itself.
2015-05-11T21:35:28.458841+00:00 app[web.1]: npm ERR! node ./bin/www
2015-05-11T21:35:28.471756+00:00 app[web.1]: npm ERR! /app/npm-debug.log
2015-05-11T21:35:28.459009+00:00 app[web.1]: npm ERR! You can get their info via:
2015-05-11T21:35:28.459145+00:00 app[web.1]: npm ERR! npm owner ls showtrackr
2015-05-11T21:35:28.459299+00:00 app[web.1]: npm ERR! There is likely additional logging output above.
2015-05-11T21:35:29.488054+00:00 heroku[web.1]: State changed from starting to crashed
2015-05-11T21:35:29.489121+00:00 heroku[web.1]: State changed from crashed to starting
2015-05-11T21:35:29.467921+00:00 heroku[web.1]: Process exited with status 1
2015-05-11T21:35:33.804208+00:00 heroku[web.1]: Starting process with command `npm start`
2015-05-11T21:35:35.767544+00:00 app[web.1]: Recommending WEB_CONCURRENCY=1
2015-05-11T21:35:35.767452+00:00 app[web.1]: Detected 512 MB available memory, 512 MB limit per process (WEB_MEMORY)
2015-05-11T21:35:37.227415+00:00 app[web.1]: > node ./bin/www
If anyone can help with this, that would be awesome.
Don't know why but I ran
npm install
and repushed to heroku and everything worked.

Resources