# CentOS7 install of Node-Red fails to launch

**URL:** <https://discourse.nodered.org/t/centos7-install-of-node-red-fails-to-launch/49053>\
**Category:** General\
**Created:** [29 July 2021 00:50 UTC](https://discourse.nodered.org/t/centos7-install-of-node-red-fails-to-launch/49053 "2021-07-29T00:50:47Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mitch-shiver](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mitch-shiver/32/45690_2.png) [@mitch-shiver](https://discourse.nodered.org/u/mitch-shiver)\
**Post date:** [29 July 2021 00:50 UTC](https://discourse.nodered.org/t/centos7-install-of-node-red-fails-to-launch/49053/1 "2021-07-29T00:50:47Z")

</div>

Hi all,  
Been using node-red for awhile on Windows but now trying to install it on Linux and facing an issue.

Linux version: CentOS Linux release 7.5.1804  
Node version: v6.17.1  
NPM version: 3.10.10  
Node-red version: latest (but also tried node-red@2.0.1 because that is what is working on my Windows box)  
What happens:

- Do a fresh install of node-red on the Linux box. Tried both ways of installing below and come to the same result

- Tried the following:

```auto
> node-pre-gyp ERR! UNCAUGHT EXCEPTION
> node-pre-gyp ERR! stack /usr/lib/node_modules/node-red/node_modules/make-dir/index.js:31
> node-pre-gyp ERR! stack ...defaults,
> node-pre-gyp ERR! stack ^^^
> node-pre-gyp ERR! stack
> node-pre-gyp ERR! stack SyntaxError: Unexpected token ...
> node-pre-gyp ERR! stack at createScript (vm.js:56:10)
> node-pre-gyp ERR! stack at Object.runInThisContext (vm.js:97:10)
> node-pre-gyp ERR! stack at Module._compile (module.js:549:28)
> node-pre-gyp ERR! stack at Object.Module._extensions..js (module.js:586:10)
> node-pre-gyp ERR! stack at Module.load (module.js:494:32)
> node-pre-gyp ERR! stack at tryModuleLoad (module.js:453:12)
> node-pre-gyp ERR! stack at Function.Module._load (module.js:445:3)
> node-pre-gyp ERR! stack at Module.require (module.js:504:17)
> node-pre-gyp ERR! stack at require (internal/module.js:20:19)
> node-pre-gyp ERR! stack at Object.<anonymous> (/usr/lib/node_modules/node-red/node_modules/@mapbox/node-pre-gyp/lib/install.js:13:17)

```

Another weird thing after install is that node-red does not show up in the list of npm modules (npm list). Shouldn't it?  
- I tried all the above installs both as root and logged in user, neither seemed to make a difference in the failure modes here.

**The error I get when I try to run node-red at the command line after any of the installs above is the below:**

`````auto
> [root@mybox lib]# node-red
> /usr/lib/node_modules/node-red/node_modules/fs-extra/lib/index.js:5
> ...require('./fs'),
> ^^^
> 
> SyntaxError: Unexpected token ...
> at createScript (vm.js:56:10)
> at Object.runInThisContext (vm.js:97:10)
> at Module._compile (module.js:549:28)
> at Object.Module._extensions..js (module.js:586:10)
> at Module.load (module.js:494:32)
> at tryModuleLoad (module.js:453:12)
> at Function.Module._load (module.js:445:3)
> at Module.require (module.js:504:17)
> at require (internal/module.js:20:19)
> at Object.<anonymous> (/usr/lib/node_modules/node-red/red.js:38:10)
> ````

`````

Has anyone seen this before and know what I can do to get around it to successful install? Thanks for any feedback!

Mitch

```auto

```

---

<div class="post-metadata">

**Author:** ![craigcurtin](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@craigcurtin](https://discourse.nodered.org/u/craigcurtin)\
**Post date:** [29 July 2021 01:46 UTC](https://discourse.nodered.org/t/centos7-install-of-node-red-fails-to-launch/49053/2 "2021-07-29T01:46:24Z")

</div>

I do not think there are many Centos users on here so not sure how much help you will get.

I have Centos 8 running on my main server but do not run NR on it so can not really help there.

I would suggest one of a couple of things

1. Run it under Docker on Centos
2. Upgrade to Centos 8
3. Set a Virtual machine environment on Centos are run it in there on Debian or Ubuntu

Craig

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [29 July 2021 05:49 UTC](https://discourse.nodered.org/t/centos7-install-of-node-red-fails-to-launch/49053/3 "2021-07-29T05:49:52Z")

</div>

> [@mitch-shiver](#):
>
> Node version: v6.17.1

You need nodejs at least V12.x

---

<div class="post-metadata">

**Author:** ![mitch-shiver](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mitch-shiver/32/45690_2.png) [@mitch-shiver](https://discourse.nodered.org/u/mitch-shiver)\
**Post date:** [30 July 2021 15:27 UTC](https://discourse.nodered.org/t/centos7-install-of-node-red-fails-to-launch/49053/4 "2021-07-30T15:27:34Z")

</div>

Hi all,

@craigcurtin unfortunately I have no control over the OS version or flavor, and due to server compute capabilities, running docker or another VM just isn't feasible....

@Colin that was the issue! I don't know why, maybe because it is an older Centos version, but the upgrade path on that system stopped at v6. When I downloaded the binaries and installed manually, it went to v14, and the problem disappeared. Thanks for your help!

Mitch

---

<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:** [13 August 2021 15:28 UTC](https://discourse.nodered.org/t/centos7-install-of-node-red-fails-to-launch/49053/5 "2021-08-13T15:28:05Z")

</div>

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