All Questions

Tagged with
Filter by
Sorted by
Tagged with
648 votes
39 answers
393k views

Heroku + node.js error (Web process failed to bind to $PORT within 60 seconds of launch)

I have my first node.js app (runs fine locally) - but I am unable to deploy it via heroku (first time w/ heroku as well). The code is below. SO doesn't let me write so much code, so I would just say ...
user428900's user avatar
  • 7,141
456 votes
62 answers
683k views

npm ERR cb() never called

I have a Node.js app hosted on Heroku. Every time I do a git push heroku I get the following error: Counting objects: 14, done. Delta compression using up to 6 threads. Compressing objects: 100% (12/...
Louise K's user avatar
  • 4,771
403 votes
12 answers
196k views

Should I check in folder "node_modules" to Git when creating a Node.js app on Heroku?

I followed the basic getting started instructions for Node.js on Heroku here: https://devcenter.heroku.com/categories/nodejs These instructions don't tell you to create a .gitignore node_modules, and ...
Jason Griffin's user avatar
188 votes
7 answers
95k views

What does "./bin/www" do in Express 4.x?

I just started to learn about Express 4.0 in my Node.js app, and I found that it generated ./bin/www file, on which only the application server and port settings are written and everything others like ...
Blaszard's user avatar
  • 31.5k
145 votes
34 answers
284k views

First Heroku deploy failed `error code=H10`

I deployed my app to Heroku. It's a node.js + express + socket.io app and this is the package.json file { "name": "game_test", "author": "Ilya", "description": "A test app for our board game", ...
ilyo's user avatar
  • 36.2k
140 votes
6 answers
185k views

Defining an array as an environment variable in node.js

I have an array that I pull data from. festivals = ['bonnaroo', 'lollapalooza', 'coachella'] Since I'm using heroku, it may be better to replace it with an environment variable, but I'm not sure ...
paranoidhominid's user avatar
126 votes
10 answers
151k views

How to use environment variables in package.json

Because we don't want sensitive data in the project code, including the package.json file, using environment variables would be a logical choice in my opinion. Example package.json: "...
kaasdude's user avatar
  • 1,426
111 votes
13 answers
61k views

Heroku NodeJS http to https ssl forced redirect

I have an application up and running on Heroku with Express.js on Node.js with https. How do I identify the protocol to force a redirect to https with Node.js on Heroku? My app is just a simple http-...
Derek Bredensteiner's user avatar
103 votes
6 answers
88k views

Allow CORS REST request to a Express/Node.js application on Heroku

I've written a REST API on the express framework for node.js that works for requests from the js console in Chrome, and URL bar, etc. I'm now trying to get it working for requests from another app, on ...
Jamie Folsom's user avatar
  • 1,297
99 votes
6 answers
69k views

What is the proper way to use the node.js postgresql module?

I am writing a node.js app on Heroku and using the pg module. I can't figure out the "right" way to get a client object for each request that I need to query the database. The documentation uses code ...
Philip's user avatar
  • 4,148
94 votes
3 answers
63k views

Webpack for back-end?

I was just wondering, I started using Webpack for a new project and so far it's working fine. I almost would say I like it better than Grunt, which I used before. But now I'm quite confused how and or ...
Erik van de Ven's user avatar
76 votes
9 answers
131k views

Setting the port for node.js server on Heroku

I launched a node.js server with the following line to set the port: app.set('port', process.env.PORT || 8080); This means that, it should either read the PORT env variable or default to 8080, as it ...
Crocodile's user avatar
  • 5,785
75 votes
18 answers
111k views

Node.js, PostgreSQL error: no pg_hba.conf entry for host

I am following this article ((http://nodeexamples.com/2012/09/21/connecting-to-a-postgresql-database-from-node-js-using-the-pg-module/). I have already deployed my app to heroku and currently using ...
stcho's user avatar
  • 1,999
73 votes
3 answers
108k views

What is Procfile? and Web and Worker

Is it necessary to give 'worker' information in Procfile? If yes then what it is actually? I have already added web: node server/server.js detail in the Procfile.
Maulik Suchak's user avatar
65 votes
5 answers
38k views

'Self signed certificate' error during query the Heroku hosted Postgres database from the Node.js application

My Node.js app is able to work with local Postgres database via npm pg module. I can connect to the Heroku hosted Postgres database (free Hobby Dev plan) via command line with heroku pg:psql command ...
akzhar's user avatar
  • 653
61 votes
11 answers
164k views

NextJS cannot find a valid build in the '.next' directory

I looked at the following question before asking this one but I believe mine is different because I am not using Docker: Nextjs fails to find valid build in the '.next' directory in production ...
Captain Kirk's user avatar
  • 1,016
58 votes
9 answers
42k views

Heroku + Node: Cannot find module error

My Node app is running fine locally, but has run into an error when deploying to Heroku. The app uses Sequelize in a /models folder, which contains index.js, Company.js and Users.js. Locally, I am ...
surfearth's user avatar
  • 3,137
58 votes
10 answers
20k views

NPM private git module on Heroku

I am trying to deploy my app to Heroku however I rely on using some private git repos as modules. I do this for code reuse between projects, e.g. I have a custom logger I use in multiple apps. "...
henry.oswald's user avatar
  • 5,394
58 votes
7 answers
29k views

How to deploy node app that uses grunt to heroku

I'm using grunt and also grunt plugins like grunt-contrib-copy, grunt-contrib-mincss (that listed as npm dependencies for my application). Also I don't commit npm_modules folder and public folder, ...
ValeriiVasin's user avatar
  • 8,698
57 votes
6 answers
20k views

Using Heroku Scheduler with Node.js

There is literally no tutorial about using Heroku Scheduler with Node.js. Assume that I have a function called sayHello() and I would like to run it every 10 mins. How can I use it in controller. In ...
Ali's user avatar
  • 5,398
57 votes
6 answers
61k views

Connecting Heroku App to Atlas MongoDB Cloud service

To antecipate the question: do I need to get SSL support on Heroku in order to establish a connection between Heroku and Atlas MongoDB Cloud using SSL? (TSL/SSL connection is a requirement to access ...
amaralbf's user avatar
  • 900
52 votes
7 answers
18k views

Deploying Firebase App with Service Account to Heroku (environment variables with dotenv)

I have a node application that uses a firebase service account. I would like to deploy the app to Heroku, but I don't want to make my secret keys public. I am deploying directly from a public github ...
Luke Schlangen's user avatar
50 votes
7 answers
11k views

Can I run coffeescript in Heroku?

I have a node.js app written in CoffeeScript. I'm wondering what is needed in order to host the app on Heroku. Thanks
donald's user avatar
  • 23.7k
50 votes
13 answers
147k views

Heroku: "No default language could be detected for this app" error thrown for node app

I am learning NodeJS and the course I'm following has several projects, arranged by sections. I have all the projects under one main folder, which is also a git repository. Each of these subfolders ...
Dust_In_The_Wind's user avatar
50 votes
4 answers
47k views

how to show all console.log from node.js in heroku?

I have deployed a node.js application to node.js but not able to see the complete console.log statements from my app. I am using: heroku logs Some of the logging is shown but looks like it is not ...
Pindakaas's user avatar
  • 4,419
49 votes
10 answers
36k views

Heroku server crashes with "JavaScript heap out of memory" when deploying 'react-admin' app

I am currently developing an admin panel using 'react-admin' which works well on my local, but as soon as I upload the app to Heroku, the build fails with the following error: "FATAL ERROR: ...
Vladimir_Grigore's user avatar
48 votes
8 answers
34k views

How to deploy node that uses Gulp to heroku

I'm using gulp and also gulp plugins like gulp-minify-css, gulp-uglify etc (that listed as npm dependencies for my application). Also I don't commit npm_modules folder and public folder, where all ...
Inanc Gumus's user avatar
  • 26.4k
46 votes
3 answers
141k views

How to specify a port number for pm2

I'm trying to use pm2 to manage a node.js cluster pm2 start . -i 3 I'm currently running the app on heroku and using a Procfile with the above command, but I cannot figure out how to configure pm2 ...
Luke W's user avatar
  • 8,636
45 votes
5 answers
75k views

Error [ERR_UNSUPPORTED_DIR_IMPORT]: Directory import when attempting to start Nodejs App locally

I'm caught in a bit of a loop trying to deploy my app to Heroku. My import statements (e.g. import cors from 'cors') seem to prevent the app from launching in production, due to the "Cannot Load ...
brickandbone's user avatar
44 votes
1 answer
25k views

multiple worker/web processes on a single heroku app

Is there some way to configure multiple worker and/or web processes to run in the single Heroku app container? Or does this have to be broken up into multiple Heroku apps? For example: worker: node ...
tobius's user avatar
  • 835
42 votes
4 answers
20k views

Heroku + node.js: I have a server which uses multiple ports. How can I get Heroku to allocate them?

Umm I'll try to be more clear.. In an application server I have written in node.js, I have inner-proxy for multiple ports: in my 8080 port I have my rest api. in my 3000 port I have my push server ...
Amit Evron's user avatar
37 votes
3 answers
29k views

How to deploy node that uses Webpack to heroku

I'm using webpack. Also I don't commit npm_modules folder and public folder, where all generated files are. And I can't figure out how to build my app (I have webpack build command) after deploy and ...
Inanc Gumus's user avatar
  • 26.4k
37 votes
2 answers
13k views

How to communicate Web and Worker dynos with Node.js on Heroku?

Web Dynos can handle HTTP Requests and while Web Dynos handles them Worker Dynos can handle jobs from it. But I don't know how to make Web Dynos and Worker Dynos to communicate each other. For ...
jwchang's user avatar
  • 10.7k
36 votes
4 answers
24k views

Heroku Error H14 (No web processes running)

Pretty sure some people encountered this problem before. Followed all the instructions to setup node and npm. When pushing to heroku there were no errors. But when I open the app, it shows "...
John Lee's user avatar
  • 1,251
36 votes
4 answers
41k views

Running npm scripts conditionally

I have 2 main build configurations - dev and prod. I push updates to a heroku server that run npm install --production to install my app. In the package.json I have the following segment: "scripts": ...
Protostome's user avatar
  • 5,809
36 votes
8 answers
66k views

How to fix "Error: The server does not support SSL connections" when trying to access database in localhost?

I am following Heroku's node.js tutorial to provision a Postgres database. After creating a simple table and connecting to localhost:5000/db, I get an error saying "Error: The server does not support ...
joshua0308's user avatar
35 votes
2 answers
32k views

Does heroku restart NodeJS server if application crashes

We are running NodeJS server on Heroku. we want to know whether heroku will restart the application if application crashes. Also will there any different behavior between free version and paid version?...
Fizer Khan's user avatar
  • 90.5k
34 votes
3 answers
113k views

Trying to render iframe: ancestor violates the following Content Security Policy directive: "frame-ancestors 'none'"

I would like to render an iframe with the source being Github like so: <iframe src="https://gist.github.com/user45445/9bf8d568e3350146ba302d7d67ad576f"> </iframe> This is the error I get ...
fresh5447's user avatar
  • 1,292
33 votes
4 answers
29k views

Puppeteer unable to run on Heroku

I deployed an app on heroku, and I added the Puppeteer Heroku buildpack. After a succesful redeployment, I tried to run it and it fails. Using heroku logs -t, I get this error message: 2018-09-07T13:...
user1584421's user avatar
  • 3,707
33 votes
10 answers
70k views

Error: Cannot resolve module 'babel-loader'

I'm trying to run webpack on my postinstall script in my package.json when I push to heroku but I am getting the following error. ERROR in Entry module not found: Error: Cannot resolve module 'babel-...
Geraint's user avatar
  • 3,352
33 votes
6 answers
58k views

How to set environment variables on Heroku for Node app and connect to the PostgreSQL database?

I know there are the same/similar questions on stack overflow and I have read the documentation too-I just still don't understand ANYTHING- how to set those variables and WHERE!! to set them. My env/...
javascript2016's user avatar
32 votes
7 answers
62k views

Use Git dependencies with npm and Node on Heroku

I have this package.json file: { "name": "application-name" , "version": "0.0.1" , "private": true , "dependencies": { "coffee-script": "1.1.3" , "express": "2.5.0" , "less": "...
Julien's user avatar
  • 9,216
32 votes
6 answers
76k views

heroku is giving me Method not allowed [closed]

Okay, so I've been on this problem for hours now with no idea how to solve this, since I'm just a newbie. I was following a UDEMY course titled WEBDEVBOOTCAMP by Colt Steele. On the deployment section,...
Kynt's user avatar
  • 321
32 votes
4 answers
26k views

How can I invoke npm on heroku command line (to install bower components)?

Bower is for client side Javascript what npm is for the server side and reads a component.json file to recognize dependencies that should be fetched at deploy time so I'd be happy it heroku would run ...
Stefan's user avatar
  • 3,392
31 votes
3 answers
34k views

Deploy the backend and frontend on the same Heroku app/dyno

At the root of my project, I have a frontend and backend folder. Both folders contain a package.json that list their dependencies. How do I tell Heroku to run npm install on both folders when ...
Maxime Dupré's user avatar
31 votes
3 answers
41k views

How to fix: "error [email protected]: The platform "linux" is incompatible with this module."

I want to deploy my website to Heroku but I get the next error: error [email protected]: The platform "linux" is incompatible with this module. error Found incompatible module. I've already tried ...
Ilya Solodeev's user avatar
30 votes
8 answers
39k views

Why does Heroku fail to detect Node.js buildpack?

I git cloned a Node.js application (the version specified in the package.json being 4.1.2 and that of my local machine being 6.2.2) and tried to git push on Heroku. But it failed to build and gave ...
Shree's user avatar
  • 553
29 votes
1 answer
7k views

How can I host my own Parse Server on Heroku using MongoDB? [closed]

(To be clear, Im asking this question so as to provide the answer I found in an effort to help others that have been similarly affected by the Parse closure) Parse.com recently anounced that they are ...
Wesley Smith's user avatar
  • 19.5k
29 votes
7 answers
17k views

Can I set up socket.io chat on heroku?

I have a simple socket.io chat application which I've uploaded to one of the new Heroku 'cedar' stacks. Now I almost have everything working but I've hit one stumbling block. On my localhost, I open ...
David Tuite's user avatar
  • 22.4k
28 votes
9 answers
35k views

Heroku Cannot GET /

I am new to Heroku and believe I am following all of the steps outlined on Heroku's website to deploy via node.js – https://devcenter.heroku.com/articles/getting-started-with-nodejs – but despite ...
bullcitydave's user avatar

1
2 3 4 5
144