# Upgrading node.js v8 to v10. Straight forward? Any recommended after install steps?

**URL:** <https://discourse.nodered.org/t/upgrading-node-js-v8-to-v10-straight-forward-any-recommended-after-install-steps/14056>\
**Category:** General\
**Created:** [6 August 2019 15:32 UTC](https://discourse.nodered.org/t/upgrading-node-js-v8-to-v10-straight-forward-any-recommended-after-install-steps/14056 "2019-08-06T15:32:22Z")\
**Posts on this page:** 14\
**Page:** 1

<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:** [6 August 2019 15:32 UTC](https://discourse.nodered.org/t/upgrading-node-js-v8-to-v10-straight-forward-any-recommended-after-install-steps/14056/1 "2019-08-06T15:32:23Z")

</div>

Hi all,

On windows, when upgrading Node.js from 8 LTS to 10 LTS, is there any specific steps I should/must take?

- By this I mean should/must I re-run Node-red installer after node.js?
- How about a contrib node that does a node-gyp step on install?
- Possibility of running node.js 8 & 10 side by side?
- Any bad experiences anyone?

Any advise appreciated and welcomed.

NOTE: I have searched the forum and have seen some people have had issues but I cant see any defined steps (I admit I spent only 5 mins looking but its a difficult one to pin down & I need to get this right 1st time).

Current node-red version is 20.5

Cheers.

---

<div class="post-metadata">

**Author:** ![afelix](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/afelix/32/9743_2.png) [@afelix](https://discourse.nodered.org/u/afelix)\
**Post date:** [6 August 2019 16:18 UTC](https://discourse.nodered.org/t/upgrading-node-js-v8-to-v10-straight-forward-any-recommended-after-install-steps/14056/2 "2019-08-06T16:18:17Z")

</div>

I’ll readily admit I haven’t tried this on Windows so others will have to come in there. On Linux/Mac, nvm exists to keep multiple versions of Node running on the same machine. There have been several attempts to create a similar thing for windows. This one has 10k stars on GitHub, an active developer, and the documentation is pretty straightforward, leading me to think it might be worth a try. Especially as it keeps the version selected over reboots/updates the version to all open commandline prompts, and does not depend on node itself. For your other questions I do not have an answer.

> **[coreybutler/nvm-windows](https://github.com/coreybutler/nvm-windows)**
>
> A node.js version management utility for Windows. Ironically written in Go. - coreybutler/nvm-windows

---

<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:** [6 August 2019 16:31 UTC](https://discourse.nodered.org/t/upgrading-node-js-v8-to-v10-straight-forward-any-recommended-after-install-steps/14056/3 "2019-08-06T16:31:32Z")

</div>

> [@Steve-Mcl](#):
>
> On windows, when upgrading Node.js from 8 LTS to 10 LTS, is there any specific steps I should/must take?

I thought there was a bit about this in the docs, but I can't find it. In fact I can't find instructions for installing on Windows at all, which is a bit odd.

---

<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:** [6 August 2019 23:27 UTC](https://discourse.nodered.org/t/upgrading-node-js-v8-to-v10-straight-forward-any-recommended-after-install-steps/14056/4 "2019-08-06T23:27:12Z")

</div>

On a major update for any platform, you should rebuild your nodes. While this is not needed for all nodes (only for some that require compiling), it is safer to do it for everything.

Personally, I simply delete the `<userDir>/node_modules` folder and then reinstall:

```auto
npm install --production

```

---

<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:** [7 August 2019 09:50 UTC](https://discourse.nodered.org/t/upgrading-node-js-v8-to-v10-straight-forward-any-recommended-after-install-steps/14056/5 "2019-08-07T09:50:09Z")

</div>

Does that rebuild any nodes installed globally?

---

<div class="post-metadata">

**Author:** ![kuema](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/kuema/32/6542_2.png) [@kuema](https://discourse.nodered.org/u/kuema)\
**Post date:** [7 August 2019 10:02 UTC](https://discourse.nodered.org/t/upgrading-node-js-v8-to-v10-straight-forward-any-recommended-after-install-steps/14056/6 "2019-08-07T10:02:26Z")

</div>

> [@Colin](#):
>
> Does that rebuild any nodes installed globally?

No, only the modules in your current project directory.

You need to use the `-g` switch for global modules.

---

<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:** [7 August 2019 14:03 UTC](https://discourse.nodered.org/t/upgrading-node-js-v8-to-v10-straight-forward-any-recommended-after-install-steps/14056/7 "2019-08-07T14:03:55Z")

</div>

> [@afelix](#):
>
> nvm exists to keep multiple versions of Node running on the same machine

Yeah. Damn windows!

Thanks everyone for suggestions and info.

To summarize...

1. Out of production hours
2. Delete local node\_modules (and global?)
3. Upgrade node  
3.b probably upgrade node-red (may as well)
4. npm install -g --production
5. npm install --production

Seem correct? Any thoughts?

---

<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:** [7 August 2019 15:27 UTC](https://discourse.nodered.org/t/upgrading-node-js-v8-to-v10-straight-forward-any-recommended-after-install-steps/14056/8 "2019-08-07T15:27:28Z")

</div>

For the global part, best to also include `--unsafe-perm` which deals with odd permissions issues.

> [@Steve-Mcl](#):
>
> Damn windows!

??? It isn't any harder than Linux. Also, if you want to (and are using W10), you can use the WSL and do everything in Linux too!

---

<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:** [7 August 2019 18:42 UTC](https://discourse.nodered.org/t/upgrading-node-js-v8-to-v10-straight-forward-any-recommended-after-install-steps/14056/9 "2019-08-07T18:42:34Z")

</div>

> [@TotallyInformation](#):
>
> ??? It isn't any harder than Linux.

I was referring to nvm

---

<div class="post-metadata">

**Author:** ![kuema](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/kuema/32/6542_2.png) [@kuema](https://discourse.nodered.org/u/kuema)\
**Post date:** [8 August 2019 04:59 UTC](https://discourse.nodered.org/t/upgrading-node-js-v8-to-v10-straight-forward-any-recommended-after-install-steps/14056/10 "2019-08-08T04:59:13Z")

</div>

I have been using [nvm-windows](https://github.com/coreybutler/nvm-windows) on my Win10 development machine at work for some time now. It uses those Windows symlinks to switch between versions.

The only annoying thing (or feature?) is, that it does not migrate your global packages. You have to install them manually with every new NodeJS version. I simply move or copy them over, when it is just a minor NodeJS version jump.

All in all, it works just fine. But since I am hardly ever using different Node versions at the moment, it is just for convenience in the upgrade process (in contrast to an MSI installer package or handling NodeJS versions manually) 😀

---

<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:** [8 August 2019 07:41 UTC](https://discourse.nodered.org/t/upgrading-node-js-v8-to-v10-straight-forward-any-recommended-after-install-steps/14056/11 "2019-08-08T07:41:55Z")

</div>

> [@kuema](#):
>
> for convenience in the upgrade process

Personally, I just stick with the current LTS version or thereabouts on my Windows dev machine. I need to get better at doing some testing though. My recent release of [alternate-node-red-installer](https://github.com/TotallyInformation/alternate-node-red-installer) makes testing a lot easier since a simple command creates a new, completely clean installation of Node-RED in a new folder. If I need to test with another version of node.js, I can simply install that into WSL and test again from there.

I don't like faffing with any of the multi-version tools, I much prefer to stick with the official installs.

---

<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:** [8 August 2019 08:49 UTC](https://discourse.nodered.org/t/upgrading-node-js-v8-to-v10-straight-forward-any-recommended-after-install-steps/14056/12 "2019-08-08T08:49:10Z")

</div>

> [@TotallyInformation](#):
>
> , I can simply install that into WSL and test again from there.

I know of and have tried out WSL but I think I'm missing some understanding on how things fit together.

How do you achieve this? I'm curious as to what/where/how you install and executive against different node versions.

I feel I'm missing something. Can't quite get my head around what fits where regards WSL.

---

<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:** [8 August 2019 10:58 UTC](https://discourse.nodered.org/t/upgrading-node-js-v8-to-v10-straight-forward-any-recommended-after-install-steps/14056/13 "2019-08-08T10:58:15Z")

</div>

> [@Steve-Mcl](#):
>
> Can't quite get my head around what fits where regards WSL

No problem.

WSL is a virtual Linux environment running under Windows 10. So you get a lightweight VM effectively.

So you can use WSL like any other Linux environment. Install node.js (and a version manager if you want to), then install Node-RED, etc.

Interestingly, I no longer use PuTTY - actually KiTTY - to connect to my Pi's. I use WSL with SSH command line client with a Windows shortcut to fire it up. This is actually faster! Go figure.

---

<div class="post-metadata">

**Author:** ![kuema](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/kuema/32/6542_2.png) [@kuema](https://discourse.nodered.org/u/kuema)\
**Post date:** [8 August 2019 18:27 UTC](https://discourse.nodered.org/t/upgrading-node-js-v8-to-v10-straight-forward-any-recommended-after-install-steps/14056/14 "2019-08-08T18:27:23Z")

</div>

> [@TotallyInformation](#):
>
> Interestingly, I no longer use PuTTY - actually KiTTY

Thanks for that one. 👍 Never heard of KiTTY, but it actually has a lot of features that I have missed in PuTTY for all the years. Will give it a try tomorrow at work... no Windows at home... fortunately. 🕶
