# \[solved\] Node-red v3.0.0, PI installer script - node-red does not start after installer is finished (setting.js 'No such file or directory')

**URL:** <https://discourse.nodered.org/t/solved-node-red-v3-0-0-pi-installer-script-node-red-does-not-start-after-installer-is-finished-setting-js-no-such-file-or-directory/65085>\
**Category:** General\
**Created:** [14 July 2022 10:09 UTC](https://discourse.nodered.org/t/solved-node-red-v3-0-0-pi-installer-script-node-red-does-not-start-after-installer-is-finished-setting-js-no-such-file-or-directory/65085 "2022-07-14T10:09:26Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [14 July 2022 10:09 UTC](https://discourse.nodered.org/t/solved-node-red-v3-0-0-pi-installer-script-node-red-does-not-start-after-installer-is-finished-setting-js-no-such-file-or-directory/65085/1 "2022-07-14T10:09:26Z")

</div>

TLDR: NOTE: The bash script has been fixed and now works.

Just installed V3.0.0 on a Pi model 3B V1.2 and ran the 'diff' to compare the settngs.js files and get this:

```auto
Just FYI : Your settings.js file is different from the latest defaults.
You may wish to run
    diff -y --suppress-common-lines /usr/lib/node_modules/node-red/settings.js /home/pi/.node-red/settings.js
to compare them and see what the latest options are.
**pi@testpi** : **~ $** diff -y --suppress-common-lines /usr/lib/node_modules/node-red/settings.js /home/pi/.node-red/settings.js
diff: /usr/lib/node_modules/node-red/settings.js: No such file or directory

```

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [14 July 2022 10:25 UTC](https://discourse.nodered.org/t/solved-node-red-v3-0-0-pi-installer-script-node-red-does-not-start-after-installer-is-finished-setting-js-no-such-file-or-directory/65085/2 "2022-07-14T10:25:01Z")

</div>

looks like there is an install issue. When I try to start NR I get

```auto
pi@testpi:/ $ node-red-start

Node-RED is not yet fully installed. Please re-run the install script again manually.
 
   bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)
 
then retry node-red-start
pi@testpi:/ $ 

```

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [14 July 2022 10:30 UTC](https://discourse.nodered.org/t/solved-node-red-v3-0-0-pi-installer-script-node-red-does-not-start-after-installer-is-finished-setting-js-no-such-file-or-directory/65085/3 "2022-07-14T10:30:56Z")

</div>

Hi Paul. Can you show us the install log from the initial run of the installer script?

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [14 July 2022 10:41 UTC](https://discourse.nodered.org/t/solved-node-red-v3-0-0-pi-installer-script-node-red-does-not-start-after-installer-is-finished-setting-js-no-such-file-or-directory/65085/4 "2022-07-14T10:41:00Z")

</div>

bin playing some more. I reinstalled v2.2.2 with  
`sudo npm install -g --unsafe-perm node-red@2.2.2` and it installed fine, ran and. so I tried  
`sudo npm install -g --unsafe-perm node-red' and it runs and `/usr/lib/node\_modules/node-red`is populated:`  
**pi@testpi** : **/usr/lib/node\_modules/node-red $** ls  
**bin** CHANGELOG.md **lib** LICENSE **node\_modules** package.json README.md **red.js** settings.js

So I ran the same command with out the version and get this:

pi@testpi:/usr/lib/node\_modules/node-red $ sudo npm install -g --unsafe-perm node-red  
/usr/bin/node-red -\> /usr/lib/node\_modules/node-red/red.js  
/usr/bin/node-red-pi -\> /usr/lib/node\_modules/node-red/bin/node-red-pi

- node-red@3.0.0  
added 9 packages from 10 contributors, removed 16 packages, updated 40 packages and moved 1 package in 43.533s

pi@testpi:/usr/lib/node\_modules/node-red $ ls

and there is nothing in it.

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [14 July 2022 10:42 UTC](https://discourse.nodered.org/t/solved-node-red-v3-0-0-pi-installer-script-node-red-does-not-start-after-installer-is-finished-setting-js-no-such-file-or-directory/65085/5 "2022-07-14T10:42:24Z")

</div>

This or something else?

```auto
Running Node-RED install for user pi at /home/pi on raspbian

This can take 20-30 minutes on the slower Pi versions - please wait.

  Stop Node-RED ✔
  Remove old version of Node-RED ✔
  Node option not specified : --node14, --node16, or --node18
  Leave existing Node.js : v14.20.0 Npm 6.14.17
  Clean npm cache -
  Install Node-RED core ✔ 3.0.0 
  Move global nodes to local -
  Leave existing nodes -
  Install extra Pi nodes ✔
  Add shortcut commands ✔
  Update systemd script ✔
                                      

Any errors will be logged to /var/log/nodered-install.log
All done.
You can now start Node-RED with the command node-red-start
  or using the icon under Menu / Programming / Node-RED
Then point your browser to localhost:1880 or http://{your_pi_ip-address}:1880

Started : Thu 14 Jul 2022 06:21:49 AM EDT 
Finished: Thu 14 Jul 2022 06:23:11 AM EDT
 
Just FYI : Your settings.js file is different from the latest defaults.
You may wish to run
   diff -y --suppress-common-lines /usr/lib/node_modules/node-red/settings.js /home/pi/.node-red/settings.js
to compare them and see what the latest options are.
 
pi@testpi:/ $ node-red
-bash: node-red: command not found

```

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [14 July 2022 10:51 UTC](https://discourse.nodered.org/t/solved-node-red-v3-0-0-pi-installer-script-node-red-does-not-start-after-installer-is-finished-setting-js-no-such-file-or-directory/65085/6 "2022-07-14T10:51:07Z")

</div>

@Steve-Mcl if I install using `sudo npm install -g --unsafe-perm node-red` it works, /usr/lib/node\_modules/node-red is populated

```auto
pi@testpi:/usr/lib/node_modules/node-red $ ls
bin CHANGELOG.md lib LICENSE node_modules package.json README.md red.js settings.js
pi@testpi:/usr/lib/node_modules/node-red $ 

```

and the `diff` works.

---

<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:** [14 July 2022 10:54 UTC](https://discourse.nodered.org/t/solved-node-red-v3-0-0-pi-installer-script-node-red-does-not-start-after-installer-is-finished-setting-js-no-such-file-or-directory/65085/7 "2022-07-14T10:54:29Z")

</div>

> [@zenofmud](#):
>
> `Any errors will be logged to /var/log/nodered-install.log`

That one I think.

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [14 July 2022 11:02 UTC](https://discourse.nodered.org/t/solved-node-red-v3-0-0-pi-installer-script-node-red-does-not-start-after-installer-is-finished-setting-js-no-such-file-or-directory/65085/8 "2022-07-14T11:02:46Z")

</div>

@Steve-Mcl Here is the log, I reinstalled using the bash script and NR will not start

```auto
pi@testpi:~ $ cat /var/log/nodered-install.log
Already have nodejs v14.20.0
OLD nodejs 14 :
NEW nodejs :

***************************************

Started : Thu 14 Jul 2022 06:59:41 AM EDT
Running for user pi at /home/pi
Found global nodes: :

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Reading package lists...
Building dependency tree...
Reading state information...
Package 'nodered' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Versions: node:v14.20.0 npm:6.14.17
Now install Node-RED 
npm WARN saveError ENOENT: no such file or directory, open '/home/pi/package.json'
npm WARN enoent ENOENT: no such file or directory, open '/home/pi/package.json'
npm WARN node-red-contrib-mp4frag@0.1.0-beta.4 requires a peer of socket.io@2 || 3 || 4 but none is installed. You must install peer dependencies yourself.
npm WARN node-red-contrib-ui-mp4frag@0.1.0-beta.3 requires a peer of node-red-dashboard@^2.26.1 but none is installed. You must install peer dependencies yourself.
npm WARN pi No description
npm WARN pi No repository field.
npm WARN pi No README data
npm WARN pi No license field.

+ node-red@3.0.0
updated 1 package in 15.789s
3.0.0 
Now create basic package.json for the user and move any global nodes
Installing extra nodes: node-red-node-pi-gpio@latest node-red-node-random@latest node-red-node-ping@latest node-red-contrib-play-audio@latest node-red-node-smooth@latest node-red-node-serialport@latest :
npm WARN expo-random@12.1.2 requires a peer of expo@* but none is installed. You must install peer dependencies yourself.
npm WARN node-red-contrib-ui-mp4frag@0.1.0-beta.3 requires a peer of node-red-dashboard@^2.26.1 but none is installed. You must install peer dependencies yourself.
npm WARN react-native-securerandom@0.1.1 requires a peer of react-native@* but none is installed. You must install peer dependencies yourself.

+ node-red-node-random@0.4.0
+ node-red-node-ping@0.3.1
+ node-red-contrib-play-audio@2.5.0
+ node-red-node-smooth@0.1.2
+ node-red-node-serialport@1.0.1
+ node-red-node-pi-gpio@2.0.4
updated 6 packages in 28.993s
Now add the shortcut and start/stop/log scripts to the menu
Now add systemd script and configure it for pi:pi @ /home/pi
ln: failed to create symbolic link '/usr/bin/python': File exists
Now add launcher to top bar, add cpu temp example, make sure ping works
The user `pi' is already a member of `gpio'.

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Reading package lists...
Building dependency tree...
Reading state information...
python3-rpi.gpio is already the newest version (0.7.0-0.1~bpo10+4).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Memory : 971M
Started : Thu 14 Jul 2022 06:59:41 AM EDT 
Finished: Thu 14 Jul 2022 07:01:00 AM EDT
pi@testpi:~ $ 

```

---

<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:** [14 July 2022 11:17 UTC](https://discourse.nodered.org/t/solved-node-red-v3-0-0-pi-installer-script-node-red-does-not-start-after-installer-is-finished-setting-js-no-such-file-or-directory/65085/9 "2022-07-14T11:17:36Z")

</div>

See also [Node-Red v3.0.0 Pi - Node-RED is not yet fully installed](https://discourse.nodered.org/t/node-red-v3-0-0-pi-node-red-is-not-yet-fully-installed/65089)

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [14 July 2022 11:24 UTC](https://discourse.nodered.org/t/solved-node-red-v3-0-0-pi-installer-script-node-red-does-not-start-after-installer-is-finished-setting-js-no-such-file-or-directory/65085/10 "2022-07-14T11:24:15Z")

</div>

busy looking into it (slow on a PI 3b)

Progress...  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/7/77dd34ae7a2fa22b6c34b96669ae801bfc3e394f.png)

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [14 July 2022 11:25 UTC](https://discourse.nodered.org/t/solved-node-red-v3-0-0-pi-installer-script-node-red-does-not-start-after-installer-is-finished-setting-js-no-such-file-or-directory/65085/11 "2022-07-14T11:25:23Z")

</div>

> [@zenofmud](#):
>
> ran the 'diff' to compare the settngs.js files

Just a hint, if you have VSCode installed, you can do a diff in it and edit your copy directly.

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [14 July 2022 11:26 UTC](https://discourse.nodered.org/t/solved-node-red-v3-0-0-pi-installer-script-node-red-does-not-start-after-installer-is-finished-setting-js-no-such-file-or-directory/65085/12 "2022-07-14T11:26:17Z")

</div>

@TotallyInformation Jullian, the problem is the install didn't work 😬

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [14 July 2022 11:52 UTC](https://discourse.nodered.org/t/solved-node-red-v3-0-0-pi-installer-script-node-red-does-not-start-after-installer-is-finished-setting-js-no-such-file-or-directory/65085/13 "2022-07-14T11:52:22Z")

</div>

Same problem Paul

Could you please raise issue on the installer repo (if you can)?

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [14 July 2022 12:02 UTC](https://discourse.nodered.org/t/solved-node-red-v3-0-0-pi-installer-script-node-red-does-not-start-after-installer-is-finished-setting-js-no-such-file-or-directory/65085/14 "2022-07-14T12:02:07Z")

</div>

done: [Installer bash script fails to install node-red V3.0.0 · Issue #31 · node-red/linux-installers · GitHub](https://github.com/node-red/linux-installers/issues/31)

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [14 July 2022 12:09 UTC](https://discourse.nodered.org/t/solved-node-red-v3-0-0-pi-installer-script-node-red-does-not-start-after-installer-is-finished-setting-js-no-such-file-or-directory/65085/15 "2022-07-14T12:09:02Z")

</div>

> [@zenofmud](#):
>
> Jullian, the problem is the install didn't work

Yup, I got that, I've always taken care to do a diff on the settings file - at least for major updates - been caught out on that in the past.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [14 July 2022 12:23 UTC](https://discourse.nodered.org/t/solved-node-red-v3-0-0-pi-installer-script-node-red-does-not-start-after-installer-is-finished-setting-js-no-such-file-or-directory/65085/16 "2022-07-14T12:23:05Z")

</div>

If anyone is will to try, please update NPM to latest and re-run script.

The script has been changed to use `--location=global` but I suspect earlier versions node/npm doesnt like that?

It may even be enough to specify the `--node14` or `--node16` parameter (since that will re-install node/npm)

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [14 July 2022 12:29 UTC](https://discourse.nodered.org/t/solved-node-red-v3-0-0-pi-installer-script-node-red-does-not-start-after-installer-is-finished-setting-js-no-such-file-or-directory/65085/17 "2022-07-14T12:29:29Z")

</div>

UPDATE: Dave has kindly revered the to `-g` for now. You should be able to re-run the installer script.

You may see notices about `--global` being depreciated - it is only a warning.

For the time being, "things" should work correctly now.

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [14 July 2022 12:36 UTC](https://discourse.nodered.org/t/solved-node-red-v3-0-0-pi-installer-script-node-red-does-not-start-after-installer-is-finished-setting-js-no-such-file-or-directory/65085/18 "2022-07-14T12:36:48Z")

</div>

The bash script is now working again!!  
This pi was using node.js v14.20.0 and I ran the script with no extra options.  
The 'diff' works and Node-red starts:

```auto
pi@testpi:~ $ node-red
14 Jul 08:34:39 - [info] 

Welcome to Node-RED
===================

14 Jul 08:34:39 - [info] Node-RED version: v3.0.0
14 Jul 08:34:39 - [info] Node.js version: v14.20.0
14 Jul 08:34:39 - [info] Linux 5.10.63-v7+ arm LE
14 Jul 08:34:40 - [info] Loading palette nodes
14 Jul 08:34:49 - [info] Worldmap version 2.26.1
14 Jul 08:34:49 - [info] Dashboard version 3.1.6 started at /ui
14 Jul 08:34:51 - [info] Settings file : /home/pi/.node-red/settings.js
14 Jul 08:34:51 - [info] Context store : 'default' [module=memory]
14 Jul 08:34:51 - [info] User directory : /home/pi/.node-red
14 Jul 08:34:51 - [info] Projects directory: /home/pi/.node-red/projects
14 Jul 08:34:51 - [info] Server now running at http://127.0.0.1:1880/
14 Jul 08:34:51 - [info] Active project : 00-bret-sensehat
14 Jul 08:34:51 - [info] Flows file : /home/pi/.node-red/projects/00-bret-sensehat/flow.json
14 Jul 08:34:51 - [warn] Using unencrypted credentials
14 Jul 08:34:51 - [info] Starting flows

```

---

<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:** [28 July 2022 12:37 UTC](https://discourse.nodered.org/t/solved-node-red-v3-0-0-pi-installer-script-node-red-does-not-start-after-installer-is-finished-setting-js-no-such-file-or-directory/65085/19 "2022-07-28T12:37:07Z")

</div>

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