# Deploy Node-RED to Heroku

**URL:** https://discourse.nodered.org/t/deploy-node-red-to-heroku/44095
**Category:** General
**Created:** [13 April 2021 10:58 UTC](https://discourse.nodered.org/t/deploy-node-red-to-heroku/44095 "2021-04-13T10:58:16Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![StudentStrange](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/studentstrange/32/40121_2.png) [@StudentStrange](https://discourse.nodered.org/u/StudentStrange)
#### Post date: [13 April 2021 10:58 UTC](https://discourse.nodered.org/t/deploy-node-red-to-heroku/44095/1 "2021-04-13T10:58:17Z")

</div>

Hi all,  
I further figured out about the files included in the Github repo that used to connect to the Heroku server and substituted with my own _package.json_, _flow .json_, repo link in _app.json_. After deploying again, I received an error from the logs window of Heroku CLI as below:

```auto
2021-04-13T10:22:01.693823+00:00 heroku[web.1]: Starting process with command `node --max-old-space-size=384 node_modules/node-red/red.js --settings ./settings.js --userDir ./`
2021-04-13T10:22:05.304911+00:00 heroku[web.1]: Process exited with status 1
2021-04-13T10:22:05.411606+00:00 heroku[web.1]: State changed from starting to crashed
2021-04-13T10:22:05.185465+00:00 app[web.1]: internal/modules/cjs/loader.js:883
2021-04-13T10:22:05.185490+00:00 app[web.1]: throw err;
2021-04-13T10:22:05.185491+00:00 app[web.1]: ^
2021-04-13T10:22:05.185491+00:00 app[web.1]:
2021-04-13T10:22:05.185492+00:00 app[web.1]: Error: Cannot find module '/app/node_modules/node-red/red.js'
2021-04-13T10:22:05.185492+00:00 app[web.1]: at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
2021-04-13T10:22:05.185492+00:00 app[web.1]: at Function.Module._load (internal/modules/cjs/loader.js:725:27)
2021-04-13T10:22:05.185493+00:00 app[web.1]: at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
2021-04-13T10:22:05.185494+00:00 app[web.1]: at internal/main/run_main_module.js:17:47 {
2021-04-13T10:22:05.185494+00:00 app[web.1]: code: 'MODULE_NOT_FOUND',
2021-04-13T10:22:05.185495+00:00 app[web.1]: requireStack: []
2021-04-13T10:22:05.185495+00:00 app[web.1]: }

```

[My Github repo link](https://github.com/SS-171/nodered-heroku/tree/main)  
Hope to get your help. Thank you.

---

<div class="post-metadata">

### Author: ![Stwissel](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/stwissel/32/126_2.png) [@Stwissel](https://discourse.nodered.org/u/Stwissel)
#### Post date: [24 May 2021 05:44 UTC](https://discourse.nodered.org/t/deploy-node-red-to-heroku/44095/2 "2021-05-24T05:44:04Z")

</div>

Try to update your procfile. This worked for us:

```bash
node-red --settings ./.node-red/settings.js --userDir ./.node-red

```

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [23 July 2021 05:44 UTC](https://discourse.nodered.org/t/deploy-node-red-to-heroku/44095/3 "2021-07-23T05:44:41Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
