# MODULE\_NOT FOUND error breaking Node-RED after upgrade (Windows)

**URL:** <https://discourse.nodered.org/t/module-not-found-error-breaking-node-red-after-upgrade-windows/39457>\
**Category:** General\
**Created:** [20 January 2021 19:19 UTC](https://discourse.nodered.org/t/module-not-found-error-breaking-node-red-after-upgrade-windows/39457 "2021-01-20T19:19:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![alastaira](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/alastaira/32/13683_2.png) [@alastaira](https://discourse.nodered.org/u/alastaira)\
**Post date:** [20 January 2021 19:19 UTC](https://discourse.nodered.org/t/module-not-found-error-breaking-node-red-after-upgrade-windows/39457/1 "2021-01-20T19:19:35Z")

</div>

Hi, I've had an instance of Node-RED running happily on my Windows 10 machine for some time. As I was about to go and revise some old flows, I thought I'd also take this opportunity to update to the latest version. (I believe I was previously running v1.0.0).

So, from the command line, I issued a

```auto
npm install -g --unsafe-perm node-red

```

This produced a couple of warnings, but otherwise appeared succesful:

```auto
C:\Users\alast\AppData\Roaming\npm>npm install -g --unsafe-perm node-red
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated bcrypt@3.0.8: versions < v5.0.0 do not handle NUL in passwords properly
C:\Users\alast\AppData\Roaming\npm\node-red-pi -> C:\Users\alast\AppData\Roaming\npm\node_modules\node-red\bin\node-red-pi
C:\Users\alast\AppData\Roaming\npm\node-red -> C:\Users\alast\AppData\Roaming\npm\node_modules\node-red\red.js
npm WARN ws@7.4.2 requires a peer of bufferutil@^4.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN ws@7.4.2 requires a peer of utf-8-validate@^5.0.2 but none is installed. You must install peer dependencies yourself.

```

As far as I understand, that should be the only step required (as found here: [How to update / upgrade on Windows](https://discourse.nodered.org/t/how-to-update-upgrade-on-windows/16111)). However, now when trying to start the Node-RED process, I get the following error:

```auto
C:\Users\alast\AppData\Roaming\npm>node-red
internal/modules/cjs/loader.js:463
  throw e;
  ^

Error: Package exports for 'C:\Users\alast\AppData\Roaming\npm\node_modules\node-red\node_modules\async-mutex' do not define a valid '.' target
    at resolveExportsTarget (internal/modules/cjs/loader.js:460:13)
    at resolveExports (internal/modules/cjs/loader.js:393:16)
    at Function.Module._findPath (internal/modules/cjs/loader.js:492:20)
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:787:27)
    at Function.Module._load (internal/modules/cjs/loader.js:693:27)
    at Module.require (internal/modules/cjs/loader.js:864:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (C:\Users\alast\AppData\Roaming\npm\node_modules\node-red\node_modules\@node-red\runtime\lib\api\flows.js:37:13)
    at Module._compile (internal/modules/cjs/loader.js:971:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1011:10) {
  code: 'MODULE_NOT_FOUND'
}

```

Any advice would be greatly appreciated!

---

<div class="post-metadata">

**Author:** ![alastaira](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/alastaira/32/13683_2.png) [@alastaira](https://discourse.nodered.org/u/alastaira)\
**Post date:** [20 January 2021 19:39 UTC](https://discourse.nodered.org/t/module-not-found-error-breaking-node-red-after-upgrade-windows/39457/2 "2021-01-20T19:39:02Z")

</div>

Ok, so updating Node.js to LTS v14.15.4 seems to have solved it (didn't realise that was a dependency - I think I was on v12 before which had been running fine)

---

<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:** [3 February 2021 19:39 UTC](https://discourse.nodered.org/t/module-not-found-error-breaking-node-red-after-upgrade-windows/39457/3 "2021-02-03T19:39:13Z")

</div>

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