# 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:** 3

<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:56 UTC](https://discourse.nodered.org/t/upgrade-problem-node-red-is-not-yet-fully-installed/3216/41 "2018-09-19T14:56:55Z")

</div>

Goinf around the install loop made no difference

> [@cflurin](#):
>
> To know your npm global path may help:

```
pi@plinth:~ $ npm root -g
/usr/lib/node_modules

```

How does this help?

---

<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 15:30 UTC](https://discourse.nodered.org/t/upgrade-problem-node-red-is-not-yet-fully-installed/3216/42 "2018-09-19T15:30:39Z")

</div>

well yours are in /usr/... so rather than remove /usr/local/... remove /usr/bin/node /usr/bin/npm and /usr/lib/node\_modules/npm ...  
but we are in wild west territory now... - should not have to be 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 16:38 UTC](https://discourse.nodered.org/t/upgrade-problem-node-red-is-not-yet-fully-installed/3216/43 "2018-09-19T16:38:38Z")

</div>

> [@dceejay](#):
>
> but we are in wild west territory now... - should not have to be here.

I feel your pain ☹  
Remote diagnosing situations that you can't reproduce or understand how they occurred in the first place is truly maddening!

---

<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 17:04 UTC](https://discourse.nodered.org/t/upgrade-problem-node-red-is-not-yet-fully-installed/3216/44 "2018-09-19T17:04:37Z")

</div>

It is working again

JFI - still getting this after the update

```
pi@plinth:~ $ npm root -g
/usr/lib/node_modules
```

---

<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 17:12 UTC](https://discourse.nodered.org/t/upgrade-problem-node-red-is-not-yet-fully-installed/3216/45 "2018-09-19T17:12:58Z")

</div>

That's okey, have a look here:  
[https://docs.npmjs.com/cli/root](https://docs.npmjs.com/cli/root)

---

<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 17:14 UTC](https://discourse.nodered.org/t/upgrade-problem-node-red-is-not-yet-fully-installed/3216/46 "2018-09-19T17:14:14Z")

</div>

JMI - I've got the new sd card up and running on another PiZero - plain Jun2018 full raspbian - no apt updates/upgrades

```
pi@27Jun18_19Sep18:~ $ npm root -g
/usr/lib/node_modules
```

---

<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 17:22 UTC](https://discourse.nodered.org/t/upgrade-problem-node-red-is-not-yet-fully-installed/3216/47 "2018-09-19T17:22:23Z")

</div>

Sorry, I don't catch what you mean!

---

<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 17:39 UTC](https://discourse.nodered.org/t/upgrade-problem-node-red-is-not-yet-fully-installed/3216/48 "2018-09-19T17:39:11Z")

</div>

I was just showing that I got the same info on a brand new install

---

<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 19:58 UTC](https://discourse.nodered.org/t/upgrade-problem-node-red-is-not-yet-fully-installed/3216/49 "2018-09-19T19:58:14Z")

</div>

I've got another PiZero that I'm going to attempt to upgrade

Before I start here is it current version levels

```
pi@kitchenpir:~ $ node -v
v8.11.4
pi@kitchenpir:~ $ npm -v
5.6.0
pi@kitchenpir:~ $ 

```

and Node-RED 0.19.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 20:26 UTC](https://discourse.nodered.org/t/upgrade-problem-node-red-is-not-yet-fully-installed/3216/50 "2018-09-19T20:26:08Z")

</div>

This one failed as well - just going to do this and re-try the upgrade

```
sudo rm -rf /usr/lib/node_modules
sudo rm -rf /usr/bin/node
```

---

<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 20:41 UTC](https://discourse.nodered.org/t/upgrade-problem-node-red-is-not-yet-fully-installed/3216/52 "2018-09-19T20:41:59Z")

</div>

well.....it started to look like it had worked so I posted that it had......  
and then when I re-looked and found that it had failed ☹

```
pi@kitchenpir:~/.node-red $ node-red
19 Sep 21:40:29 - [info] 

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

19 Sep 21:40:29 - [info] Node-RED version: v0.19.4
19 Sep 21:40:29 - [info] Node.js version: v8.12.0
19 Sep 21:40:29 - [info] Linux 4.9.59+ arm LE
19 Sep 21:40:32 - [info] Loading palette nodes
19 Sep 21:40:50 - [info] Dashboard version 2.8.2 started at /ui
19 Sep 21:40:52 - [info] Settings file : /home/pi/.node-red/settings.js
19 Sep 21:40:52 - [info] Context store : 'default' [module=localfilesystem]
19 Sep 21:40:53 - [error] Failed to start server:
19 Sep 21:40:53 - [error] Error: Error loading context store: SyntaxError: Unexpected token u in JSON at position 0
    at /usr/lib/node_modules/node-red/red/runtime/nodes/context/index.js:175:15
    at <anonymous>

```

but I'm wondering if this is just a separate issue?

---

<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 20:53 UTC](https://discourse.nodered.org/t/upgrade-problem-node-red-is-not-yet-fully-installed/3216/53 "2018-09-19T20:53:15Z")

</div>

What happens if you start node-red this way:

```auto
node-red-start

```

---

<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 20:56 UTC](https://discourse.nodered.org/t/upgrade-problem-node-red-is-not-yet-fully-installed/3216/54 "2018-09-19T20:56:41Z")

</div>

> [@cymplecy](#):
>
> but I'm wondering if this is just a separate issue?

I renamed my /home/pi/.node-red/context folder to something else and this time it all started up fine

(I think this last error caused by me using this pi to temporarly run the flows on my 1st broken Pi and it must have just got a bit confused so I think it can safely be ignored as having anything to do with the main upgrade issue)

---

<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 20:59 UTC](https://discourse.nodered.org/t/upgrade-problem-node-red-is-not-yet-fully-installed/3216/55 "2018-09-19T20:59:04Z")

</div>

So I'm wondering if the update script needs to add in

```
sudo rm -rf /usr/lib/node_modules
sudo rm -rf /usr/bin/node

```

as a workaround for this issue?

---

<div class="post-metadata">

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

</div>

I just updated a Pi3B+ to 0.19.4 with the script with no errors!!

---

<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 21:43 UTC](https://discourse.nodered.org/t/upgrade-problem-node-red-is-not-yet-fully-installed/3216/57 "2018-09-19T21:43:06Z")

</div>

> [@ghayne](#):
>
> I just updated a Pi3B+ to 0.19.4 with the script with no errors!!

can you remember what version of node and npm it was on beforehand?

if not - when did you last update 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 21:50 UTC](https://discourse.nodered.org/t/upgrade-problem-node-red-is-not-yet-fully-installed/3216/58 "2018-09-19T21:50:34Z")

</div>

Already did that fix (as long as you are using the bash script version)

---

<div class="post-metadata">

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

</div>

Can't tell you what version of node or npm but it was less than a week since I installed. I have only one flow and projects are not enabled.

---

<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 22:15 UTC](https://discourse.nodered.org/t/upgrade-problem-node-red-is-not-yet-fully-installed/3216/60 "2018-09-19T22:15:55Z")

</div>

> [@dceejay](#):
>
> Already did that fix (as long as you are using the bash script version)

`sudo rm -rf /usr/local/lib/node_modules/node-red* /usr/local/lib/node_modules/npm /usr/local/bin/node-red* /usr/local/bin/node /usr/local/bin/npm 2&gt;&amp;1 | sudo tee -a /var/log/nodered-install.log &gt;&gt;/dev/null`

I may be wrong but I read this change in the github repo as just cleaning up stuff in /usr/local whereas I found I needed to clean up /usr/lib stuff with

> [@cymplecy](#):
>
> sudo rm -rf /usr/lib/node\_modules  
> sudo rm -rf /usr/bin/node

_(Might not need both of those but those are the ones I ran )_

---

<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 22:19 UTC](https://discourse.nodered.org/t/upgrade-problem-node-red-is-not-yet-fully-installed/3216/61 "2018-09-19T22:19:36Z")

</div>

OK. But wiping the whole node\_modules directory would potentially wipe any non node-red stuff folk have installed. So may not be a popular thing to do..

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

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