# Upgrade problem: Node-RED is not yet fully installed

**URL:** <https://discourse.nodered.org/t/upgrade-problem-node-red-is-not-yet-fully-installed/3216>\
**Category:** General\
**Created:** [17 September 2018 14:26 UTC](https://discourse.nodered.org/t/upgrade-problem-node-red-is-not-yet-fully-installed/3216 "2018-09-17T14:26:35Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [19 September 2018 10:47 UTC](https://discourse.nodered.org/t/upgrade-problem-node-red-is-not-yet-fully-installed/3216/21 "2018-09-19T10:47:28Z")

</div>

Did that - got this

```
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 Wed 19 Sep 11:33:57 BST 2018 - Finished Wed 19 Sep 11:41:47 BST 2018

pi@plinth:~ $ cd .node-red
pi@plinth:~/.node-red $ node-red
bash: node-red: command not found
pi@plinth:~/.node-red $ node-red-start

Node-RED is not yet fully installed

Fetching Node-RED update.

 
This script will remove versions of Node.js prior to version 6.x, and Node-RED and
if necessary replace them with Node.js 8.x LTS (carbon) and the latest Node-RED from Npm.
 
It also moves any Node-RED nodes that are globally installed into your user
~/.node-red/node_modules directory, and adds them to your package.json, so that
you can manage them with the palette manager.
 
It also tries to run 'npm rebuild' to refresh any extra nodes you have installed
that may have a native binary component. While this normally works ok, you need
to check that it succeeds for your combination of installed nodes.
 
To do all this it runs commands as root - please satisfy yourself that this will
not damage your Pi, or otherwise compromise your configuration.
If in doubt please backup your SD card first.
 
Are you really sure you want to do this ? [y/N] ? 

```

Do I press y?

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [19 September 2018 10:51 UTC](https://discourse.nodered.org/t/upgrade-problem-node-red-is-not-yet-fully-installed/3216/22 "2018-09-19T10:51:36Z")

</div>

Yes otherwise it won’t do anything

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [19 September 2018 10:53 UTC](https://discourse.nodered.org/t/upgrade-problem-node-red-is-not-yet-fully-installed/3216/23 "2018-09-19T10:53:51Z")

</div>

it just seems to be re-running the update script again

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [19 September 2018 11:04 UTC](https://discourse.nodered.org/t/upgrade-problem-node-red-is-not-yet-fully-installed/3216/24 "2018-09-19T11:04:44Z")

</div>

It just re-did the upgrade and cam back to the same question again

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [19 September 2018 11:08 UTC](https://discourse.nodered.org/t/upgrade-problem-node-red-is-not-yet-fully-installed/3216/25 "2018-09-19T11:08:27Z")

</div>

In my (no real clue, simple etc etc) mind - is it an node/npm issue?

The script doesn't seem to be creating a node-red or a node-red-pi entry in /usr/bin like my other Pi seem to have

I've got 2 new sd cards arriving today - so as soon as they come - I'll set them up and see what happens from a full clean base

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [19 September 2018 11:14 UTC](https://discourse.nodered.org/t/upgrade-problem-node-red-is-not-yet-fully-installed/3216/26 "2018-09-19T11:14:38Z")

</div>

after the latest upgrade what do `node -v` and `npm -v` report ?

---

<div class="post-metadata">

**Author:** ![willemx](https://avatars.discourse-cdn.com/v4/letter/w/a4c791/32.png) [@willemx](https://discourse.nodered.org/u/willemx)\
**Post date:** [19 September 2018 11:21 UTC](https://discourse.nodered.org/t/upgrade-problem-node-red-is-not-yet-fully-installed/3216/27 "2018-09-19T11:21:52Z")

</div>

I ran the install/upgrade script again (after clearing the npm cache and purging nodejs and npm), but still no luck.  
In stead of:

```auto
Node-RED is not yet fully installed
This Node-RED install doesn't support using apt.

```

I now get into an endless loop of:

```auto
Node-RED is not yet fully installed
Fetching Node-RED update.

```

versions are now:

```auto
node -v
v8.12.0

npm -v
6.4.1

```

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [19 September 2018 11:29 UTC](https://discourse.nodered.org/t/upgrade-problem-node-red-is-not-yet-fully-installed/3216/28 "2018-09-19T11:29:48Z")

</div>

same versions as @willemx

---

<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:** [19 September 2018 11:34 UTC](https://discourse.nodered.org/t/upgrade-problem-node-red-is-not-yet-fully-installed/3216/29 "2018-09-19T11:34:12Z")

</div>

@dceejay is it worth adding a note to the upgrade page in the docs, suggesting people don't currently upgrade?

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [19 September 2018 11:52 UTC](https://discourse.nodered.org/t/upgrade-problem-node-red-is-not-yet-fully-installed/3216/30 "2018-09-19T11:52:44Z")

</div>

Well of course I'm trying it locally and it's working fine here....

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [19 September 2018 11:54 UTC](https://discourse.nodered.org/t/upgrade-problem-node-red-is-not-yet-fully-installed/3216/31 "2018-09-19T11:54:32Z")

</div>

have you got any Pi running older versions?

Is it possible to install something \< 0.19.4 on a new card and then try the update script?

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [19 September 2018 11:57 UTC](https://discourse.nodered.org/t/upgrade-problem-node-red-is-not-yet-fully-installed/3216/32 "2018-09-19T11:57:10Z")

</div>

Nothing to do with Node-RED version... it's npm failing for some reason.

---

<div class="post-metadata">

**Author:** ![willemx](https://avatars.discourse-cdn.com/v4/letter/w/a4c791/32.png) [@willemx](https://discourse.nodered.org/u/willemx)\
**Post date:** [19 September 2018 12:10 UTC](https://discourse.nodered.org/t/upgrade-problem-node-red-is-not-yet-fully-installed/3216/33 "2018-09-19T12:10:25Z")

</div>

Not sure if it helps, but here is another log:

```auto
sudo cat /root/.npm/_logs/2018-09-19T11_12_49_127Z-debug.log
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'i',
1 verbose cli '-g',
1 verbose cli '--unsafe-perm',
1 verbose cli '--no-progress',
1 verbose cli 'node-red@latest' ]
2 info using npm@6.4.1
3 info using node@v8.12.0
4 verbose npm-session 5707cdbfa0265a3c
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 verbose stack TypeError: asyncWrite is not a function
7 verbose stack at onwrite (/usr/local/lib/node_modules/npm/node_modules/readable-stream/lib/_stream_writable.js:480:7)
7 verbose stack at WritableState.onwrite (/usr/local/lib/node_modules/npm/node_modules/readable-stream/lib/_stream_writable.js:180:5)
7 verbose stack at WriteStream.to [as _worker] (/usr/local/lib/node_modules/npm/node_modules/pacote/node_modules/make-fetch-happen/cache.js:154:13)
7 verbose stack at WriteStream._write (/usr/local/lib/node_modules/npm/node_modules/mississippi/node_modules/flush-write-stream/index.js:35:13)
7 verbose stack at doWrite (/usr/local/lib/node_modules/npm/node_modules/readable-stream/lib/_stream_writable.js:428:64)
7 verbose stack at writeOrBuffer (/usr/local/lib/node_modules/npm/node_modules/readable-stream/lib/_stream_writable.js:417:5)
7 verbose stack at WriteStream.Writable.write (/usr/local/lib/node_modules/npm/node_modules/readable-stream/lib/_stream_writable.js:334:11)
7 verbose stack at WriteStream.to [as _worker] (/usr/local/lib/node_modules/npm/node_modules/pacote/node_modules/make-fetch-happen/cache.js:171:25)
7 verbose stack at WriteStream._write (/usr/local/lib/node_modules/npm/node_modules/mississippi/node_modules/flush-write-stream/index.js:35:13)
7 verbose stack at doWrite (/usr/local/lib/node_modules/npm/node_modules/readable-stream/lib/_stream_writable.js:428:64)
7 verbose stack at writeOrBuffer (/usr/local/lib/node_modules/npm/node_modules/readable-stream/lib/_stream_writable.js:417:5)
7 verbose stack at WriteStream.Writable.write (/usr/local/lib/node_modules/npm/node_modules/readable-stream/lib/_stream_writable.js:334:11)
7 verbose stack at WriteStream.to [as _worker] (/usr/local/lib/node_modules/npm/node_modules/pacote/node_modules/make-fetch-happen/cache.js:182:19)
7 verbose stack at WriteStream._write (/usr/local/lib/node_modules/npm/node_modules/mississippi/node_modules/flush-write-stream/index.js:35:13)
7 verbose stack at doWrite (/usr/local/lib/node_modules/npm/node_modules/readable-stream/lib/_stream_writable.js:428:64)
7 verbose stack at writeOrBuffer (/usr/local/lib/node_modules/npm/node_modules/readable-stream/lib/_stream_writable.js:417:5)
8 verbose cwd /home/pi
9 verbose Linux 4.14.69-v7+
10 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "i" "-g" "--unsafe-perm" "--no-progress" "node-red@latest"
11 verbose node v8.12.0
12 verbose npm v6.4.1
13 error asyncWrite is not a function
14 verbose exit [1, true]

```

---

<div class="post-metadata">

**Author:** ![willemx](https://avatars.discourse-cdn.com/v4/letter/w/a4c791/32.png) [@willemx](https://discourse.nodered.org/u/willemx)\
**Post date:** [19 September 2018 12:15 UTC](https://discourse.nodered.org/t/upgrade-problem-node-red-is-not-yet-fully-installed/3216/34 "2018-09-19T12:15:56Z")

</div>

Just an idea: would it be an option to bundle each new node-red version with it's own carefully picked versions of node and npm?  
Have a look [here](https://blog.meteor.com/know-your-node-js-ff0b3a0f634e) how Meteor does it.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [19 September 2018 13:04 UTC](https://discourse.nodered.org/t/upgrade-problem-node-red-is-not-yet-fully-installed/3216/35 "2018-09-19T13:04:26Z")

</div>

The only slightly odd thing with your setup is that both node and npm are in /usr/local/... - the update script usually installs them in /usr instead (and wipes from /usr/local...) - If you apt-get purged them as per earlier then not sure why they would still be there.

We would like to think that the LTS versions are fairly stable - but...

---

<div class="post-metadata">

**Author:** ![bradds](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bradds/32/3238_2.png) [@bradds](https://discourse.nodered.org/u/bradds)\
**Post date:** [19 September 2018 13:27 UTC](https://discourse.nodered.org/t/upgrade-problem-node-red-is-not-yet-fully-installed/3216/36 "2018-09-19T13:27:53Z")

</div>

I have been trying to get the installer working all morning. managed to do it by :-

```auto
sudo rm -rf /usr/local/lib/node_modules
sudo rm -rf /usr/local/bin/node
sudo rm -rf /usr/local/bin/npm

```

then re-run the node-red installer.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [19 September 2018 13:37 UTC](https://discourse.nodered.org/t/upgrade-problem-node-red-is-not-yet-fully-installed/3216/37 "2018-09-19T13:37:28Z")

</div>

Thanks - anyone else want to try this ?

---

<div class="post-metadata">

**Author:** ![willemx](https://avatars.discourse-cdn.com/v4/letter/w/a4c791/32.png) [@willemx](https://discourse.nodered.org/u/willemx)\
**Post date:** [19 September 2018 13:46 UTC](https://discourse.nodered.org/t/upgrade-problem-node-red-is-not-yet-fully-installed/3216/38 "2018-09-19T13:46:30Z")

</div>

I tried @bradds method and it worked; I can now start node-red again.  
Thanks!

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [19 September 2018 14:41 UTC](https://discourse.nodered.org/t/upgrade-problem-node-red-is-not-yet-fully-installed/3216/39 "2018-09-19T14:41:33Z")

</div>

Didn't seem to work for me ☹

Going round the loop again to see if lucky 2nd time

---

<div class="post-metadata">

**Author:** ![cflurin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cflurin/32/29_2.png) [@cflurin](https://discourse.nodered.org/u/cflurin)\
**Post date:** [19 September 2018 14:49 UTC](https://discourse.nodered.org/t/upgrade-problem-node-red-is-not-yet-fully-installed/3216/40 "2018-09-19T14:49:26Z")

</div>

To know your npm global path may help:

```auto
npm root -g

```

[Previous page](https://discourse.nodered.org/t/upgrade-problem-node-red-is-not-yet-fully-installed/3216.md?page=1)

[Next page](https://discourse.nodered.org/t/upgrade-problem-node-red-is-not-yet-fully-installed/3216.md?page=3)
