# Node-red not running with pm2

**URL:** <https://discourse.nodered.org/t/node-red-not-running-with-pm2/2214>\
**Category:** General\
**Created:** [10 August 2018 17:10 UTC](https://discourse.nodered.org/t/node-red-not-running-with-pm2/2214 "2018-08-10T17:10:54Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![JBX028](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jbx028/32/1703_2.png) [@JBX028](https://discourse.nodered.org/u/JBX028)\
**Post date:** [10 August 2018 17:10 UTC](https://discourse.nodered.org/t/node-red-not-running-with-pm2/2214/1 "2018-08-10T17:10:54Z")

</div>

Hi,

I just bought a new pi3+ and installed node-red into it . When I run it with command "node-red", nodered starts with not issue.

I have installed pm2 for which I have already 2 applications running this way but it doesn't work with node-red.

"which node-red" returns /usr/bin/node-red

When I run "pm2 start /usr/bin/node-red -- -v" version 3.0.3 is displayed but nothing starts and no errors are displayed.

I have tried several variations of it without success.

My config is the following:

10 Aug 17:09:13 - [info] Node-RED version: v0.18.7

10 Aug 17:09:13 - [info] Node.js version: v9.11.2

10 Aug 17:09:13 - [info] Linux 4.9.80-v7+ arm LE

Do you have any ideas of what I should do? I am don't know if it's an issue with node-red or pm2 because I can run node-red without pm2 but in the meantime, I have other processes running with pm2....

Thanks in advance..

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [10 August 2018 18:12 UTC](https://discourse.nodered.org/t/node-red-not-running-with-pm2/2214/2 "2018-08-10T18:12:09Z")

</div>

How did you install node-red?  
Whilst not causing your issue you are running a version of node which might cause you issues going forward. The recommended version is V8.xLTS

Theres a script on the Node-RED raspberry pi page on the website that includes a script that should get you to the recommended versions.  
[https://nodered.org/docs/hardware/raspberrypi](https://nodered.org/docs/hardware/raspberrypi)

There also a page that includes pm2 instructions but I think it's just doing what you have done. [https://nodered.org/docs/getting-started/running](https://nodered.org/docs/getting-started/running)

---

<div class="post-metadata">

**Author:** ![JBX028](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jbx028/32/1703_2.png) [@JBX028](https://discourse.nodered.org/u/JBX028)\
**Post date:** [10 August 2018 19:29 UTC](https://discourse.nodered.org/t/node-red-not-running-with-pm2/2214/3 "2018-08-10T19:29:35Z")

</div>

Hi,  
I have followed those instructions indeed. My version of node is 9 while on my old pi where everything worked just fine, it was 8. I can try to downgrade the version but this is strange that node-red can be started without pm2 and in the meantime I can start other nodejs app with pm2 without any issues. Seems to be something wrong with pm2 and node-red together.

Regards

---

<div class="post-metadata">

**Author:** ![nlecaude](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nlecaude/32/25_2.png) [@nlecaude](https://discourse.nodered.org/u/nlecaude)\
**Post date:** [12 August 2018 17:27 UTC](https://discourse.nodered.org/t/node-red-not-running-with-pm2/2214/4 "2018-08-12T17:27:38Z")

</div>

Try reporting the issue in pm2's GitHub, they are usually quick to respond.

---

<div class="post-metadata">

**Author:** ![nlecaude](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nlecaude/32/25_2.png) [@nlecaude](https://discourse.nodered.org/u/nlecaude)\
**Post date:** [15 August 2018 14:30 UTC](https://discourse.nodered.org/t/node-red-not-running-with-pm2/2214/5 "2018-08-15T14:30:03Z")

</div>

I found this issue, remove -v from node-red's arguments and it'll work. Seems like there's a conflict with the -v flag which for some reason seems passed to pm2 instead of Node-RED.

---

<div class="post-metadata">

**Author:** ![JBX028](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jbx028/32/1703_2.png) [@JBX028](https://discourse.nodered.org/u/JBX028)\
**Post date:** [15 August 2018 14:48 UTC](https://discourse.nodered.org/t/node-red-not-running-with-pm2/2214/6 "2018-08-15T14:48:49Z")

</div>

Yes indeed remiving -v has fixed the issue. Someone gave me also this instruction in github on the pm2 support.  
Like I said I had no issue in the past but something has changed.  
Thanks for your help
