# Node module update issue

**URL:** <https://discourse.nodered.org/t/node-module-update-issue/2799>\
**Category:** General\
**Created:** [3 September 2018 09:57 UTC](https://discourse.nodered.org/t/node-module-update-issue/2799 "2018-09-03T09:57:55Z")\
**Posts on this page:** 20\
**Page:** 2

<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:** [3 September 2018 14:53 UTC](https://discourse.nodered.org/t/node-module-update-issue/2799/21 "2018-09-03T14:53:00Z")

</div>

Ahh never mind, `remove` is an alias of `uninstall`

---

<div class="post-metadata">

**Author:** ![waqaslam](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/waqaslam/32/2271_2.png) [@waqaslam](https://discourse.nodered.org/u/waqaslam)\
**Post date:** [3 September 2018 14:58 UTC](https://discourse.nodered.org/t/node-module-update-issue/2799/22 "2018-09-03T14:58:10Z")

</div>

Though I've fixed my issue the hard-way (by deletion and altering package.json), I still wonder why isn't it possible to remove **node-red-node-email@0.1.29** at first place by issuing the uninstall command?  
Any feedback on this will be appreciated as I have another machine to update and I don't feel the urge to go that path for a number of 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:** [3 September 2018 15:19 UTC](https://discourse.nodered.org/t/node-module-update-issue/2799/23 "2018-09-03T15:19:12Z")

</div>

> [@zenofmud](#):
>
> Ahh never mind, `remove` is an alias of `uninstall`

No, remove is the linux cmd rm (= delete).

---

<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:** [3 September 2018 15:37 UTC](https://discourse.nodered.org/t/node-module-update-issue/2799/24 "2018-09-03T15:37:39Z")

</div>

> [@waqaslam](#):
>
> I still wonder why isn't it possible to remove **node-red-node-email@0.1.29** at first place by issuing the uninstall command

Was it not the fact that you had installed two versions and remove took out one but not the other?

---

<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:** [3 September 2018 18:02 UTC](https://discourse.nodered.org/t/node-module-update-issue/2799/25 "2018-09-03T18:02:54Z")

</div>

I think the original command needs updating - I think it should be

```
cd ~/usr/lib/node_modules/node-red
sudo npm uninstall --unsafe-perm node-red-node-email

```

I'll fix the docs

---

<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:** [3 September 2018 18:13 UTC](https://discourse.nodered.org/t/node-module-update-issue/2799/26 "2018-09-03T18:13:50Z")

</div>

What happens the next time you run the `update-nodejs-and-nodered` script?  
I think it will install node-red-node-email@0.1.29 again because of the dependency  
`node-red-node-email": "0.1.*` in the package.json

---

<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:** [3 September 2018 18:23 UTC](https://discourse.nodered.org/t/node-module-update-issue/2799/27 "2018-09-03T18:23:35Z")

</div>

hmmm yes - quicker we get to 0.20 the better.

---

<div class="post-metadata">

**Author:** ![waqaslam](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/waqaslam/32/2271_2.png) [@waqaslam](https://discourse.nodered.org/u/waqaslam)\
**Post date:** [4 September 2018 07:20 UTC](https://discourse.nodered.org/t/node-module-update-issue/2799/28 "2018-09-04T07:20:58Z")

</div>

As @cflurin mentioned, I can confirm that updating node-red brings back the old modules. I experienced this after I individually updated email module to 1.0.1 and then later updated the entire node-red which in a result replaced email module back with 0.1.29

---

<div class="post-metadata">

**Author:** ![waqaslam](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/waqaslam/32/2271_2.png) [@waqaslam](https://discourse.nodered.org/u/waqaslam)\
**Post date:** [4 September 2018 11:14 UTC](https://discourse.nodered.org/t/node-module-update-issue/2799/29 "2018-09-04T11:14:32Z")

</div>

@dceejay Thanks for the tip. The command you mentioned actually did work nicely, though I had to change the path a bit. It should run inside

> **/usr/lib/node\_modules/node-red**

---

<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:** [4 September 2018 11:42 UTC](https://discourse.nodered.org/t/node-module-update-issue/2799/30 "2018-09-04T11:42:36Z")

</div>

Thanks - edited my post above so as not to confuse others.  
Also we are looking at a better fix that will hopefully be in 0.19.3

---

<div class="post-metadata">

**Author:** ![tree-frog](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/tree-frog/32/89303_2.png) [@tree-frog](https://discourse.nodered.org/u/tree-frog)\
**Post date:** [17 September 2018 12:41 UTC](https://discourse.nodered.org/t/node-module-update-issue/2799/31 "2018-09-17T12:41:15Z")

</div>

Windows 10 user... I cannot uninstall "node-red-node-email" in order to upgrade it...  
"mpn uninstall -g node-red-node-email" won't uninstall the package.  
How do I do this with Windows 10 if that syntax is wrong?

Kind Regards.

---

<div class="post-metadata">

**Author:** ![hotNipi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hotnipi/32/383_2.png) [@hotNipi](https://discourse.nodered.org/u/hotNipi)\
**Post date:** [17 September 2018 12:49 UTC](https://discourse.nodered.org/t/node-module-update-issue/2799/32 "2018-09-17T12:49:44Z")

</div>

Check your spelling  
npm - "Node Package Manager"  
mpn - may refer to: Manufacturer part number says the Google  
😉

---

<div class="post-metadata">

**Author:** ![tree-frog](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/tree-frog/32/89303_2.png) [@tree-frog](https://discourse.nodered.org/u/tree-frog)\
**Post date:** [18 September 2018 13:46 UTC](https://discourse.nodered.org/t/node-module-update-issue/2799/33 "2018-09-18T13:46:59Z")

</div>

sometimes you get reality to hit you pretty hard.. the problem is it's when you least expect it.

---

<div class="post-metadata">

**Author:** ![tree-frog](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/tree-frog/32/89303_2.png) [@tree-frog](https://discourse.nodered.org/u/tree-frog)\
**Post date:** [18 September 2018 15:42 UTC](https://discourse.nodered.org/t/node-module-update-issue/2799/34 "2018-09-18T15:42:08Z")

</div>

OK I checked to see if I used the incorrect syntax on the system. I didn't.

npm uninstall -g node-red-node-email

and it replied...  
up to date in 0.047s

but did not uninstall anything.  
shows node-red-node-email as 0.1.29  
an update is available as 1.0.4  
I cannot update, I get an error.

"Failed to update: node-red-node-email  
Module not locally installed  
Check the log for more information"

I'm not sure how to proceed. I'm guessing I just have to use the older version.

---

<div class="post-metadata">

**Author:** ![hotNipi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hotnipi/32/383_2.png) [@hotNipi](https://discourse.nodered.org/u/hotNipi)\
**Post date:** [18 September 2018 16:44 UTC](https://discourse.nodered.org/t/node-module-update-issue/2799/35 "2018-09-18T16:44:06Z")

</div>

I'm not expert on npm in any way, but have you tried it in the way that was suggested earlier in this topic by dceejay?

> cd ~/usr/lib/node\_modules/node-red  
> npm uninstall --unsafe-perm node-red-node-email

---

<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:** [18 September 2018 17:11 UTC](https://discourse.nodered.org/t/node-module-update-issue/2799/36 "2018-09-18T17:11:12Z")

</div>

not quite what I said... may need an extra `sudo` with that command...

> [@Node module update issue](https://discourse.nodered.org/t/node-module-update-issue/2799/25):
>
> I think the original command needs updating - I think it should be cd ~/usr/lib/node\_modules/node-red sudo npm uninstall --unsafe-perm node-red-node-email I'll fix the docs

---

<div class="post-metadata">

**Author:** ![hotNipi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hotnipi/32/383_2.png) [@hotNipi](https://discourse.nodered.org/u/hotNipi)\
**Post date:** [18 September 2018 17:16 UTC](https://discourse.nodered.org/t/node-module-update-issue/2799/37 "2018-09-18T17:16:14Z")

</div>

For windows user I did removed the sudo. Is it ok, I don't know.

---

<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:** [18 September 2018 17:18 UTC](https://discourse.nodered.org/t/node-module-update-issue/2799/38 "2018-09-18T17:18:13Z")

</div>

Ah - for a windows user you may need to be in admin mode... other way is to find the node-red-node-email directory and just zap it 🙂 (then restart node-red)

---

<div class="post-metadata">

**Author:** ![hotNipi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hotnipi/32/383_2.png) [@hotNipi](https://discourse.nodered.org/u/hotNipi)\
**Post date:** [18 September 2018 20:12 UTC](https://discourse.nodered.org/t/node-module-update-issue/2799/39 "2018-09-18T20:12:41Z")

</div>

For windows users!  
The node-red-node-email folder to delete is located at:  
C:\Users\YourUserName\AppData\Roaming\npm\node\_modules\node-red\node\_modules

---

<div class="post-metadata">

**Author:** ![borpin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/borpin/32/1765_2.png) [@borpin](https://discourse.nodered.org/u/borpin)\
**Post date:** [28 December 2018 20:42 UTC](https://discourse.nodered.org/t/node-module-update-issue/2799/40 "2018-12-28T20:42:22Z")

</div>

> [@dceejay](#):
>
> I think the original command needs updating - I think it should be
> 
> ```auto
> cd ~/usr/lib/node_modules/node-red
> sudo npm uninstall --unsafe-perm node-red-node-email
> 
> ```

My experience is this:

Find your global npm root folder

```auto
npm -g root

```

Then navigate to the `node-red/node_modules` folder below that.

Then

```auto
npm uninstall --unsafe-perm node-red-node-email

```

Restart node-red (you get a warning the module is missing), then install it via the palette manager. Also fully refresh the browser window (shift refresh).

You will find the same issue with the _-rbe_ and the _-twitter_ node.

YMMV

[Previous page](https://discourse.nodered.org/t/node-module-update-issue/2799.md?page=1)

[Next page](https://discourse.nodered.org/t/node-module-update-issue/2799.md?page=3)
