# Attempted to update NR (late at night) now nothing works (Solved)

**URL:** <https://discourse.nodered.org/t/attempted-to-update-nr-late-at-night-now-nothing-works-solved/69096>\
**Category:** General\
**Created:** [16 October 2022 05:48 UTC](https://discourse.nodered.org/t/attempted-to-update-nr-late-at-night-now-nothing-works-solved/69096 "2022-10-16T05:48:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![CaptClaude](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/captclaude/32/2125_2.png) [@CaptClaude](https://discourse.nodered.org/u/CaptClaude)\
**Post date:** [16 October 2022 05:48 UTC](https://discourse.nodered.org/t/attempted-to-update-nr-late-at-night-now-nothing-works-solved/69096/1 "2022-10-16T05:48:54Z")

</div>

I know I shouldn't do things like this late in the evening...  
OS: MacOS  
Previously working system:

```auto
15 Oct 23:59:55 - [info] Node-RED version: v0.19.1
15 Oct 23:59:55 - [info] Node.js version: v6.11.4
15 Oct 23:59:55 - [info] Darwin 18.7.0 x64 LE

```

Ran `sudo npm install -g --unsafe-perm node-red`  
That resulted in a screen full of errors, starting with these:

```auto
/usr/local/bin/node-red -> /usr/local/lib/node_modules/node-red/red.js
/usr/local/bin/node-red-pi -> /usr/local/lib/node_modules/node-red/bin/node-red-pi

> bcrypt@5.0.1 install /usr/local/lib/node_modules/node-red/node_modules/bcrypt
> node-pre-gyp install --fallback-to-build

node-pre-gyp ERR! UNCAUGHT EXCEPTION 
node-pre-gyp ERR! stack /usr/local/lib/node_modules/node-red/node_modules/detect-libc/lib/detect-libc.js:76
node-pre-gyp ERR! stack const family = async () => {
node-pre-gyp ERR! stack ^
node-pre-gyp ERR! stack 
node-pre-gyp ERR! stack SyntaxError: Unexpected token (
node-pre-gyp ERR! stack at createScript (vm.js:56:10)
node-pre-gyp ERR! stack at Object.runInThisContext (vm.js:97:10)
node-pre-gyp ERR! stack at Module._compile (module.js:542:28)
node-pre-gyp ERR! stack at Object.Module._extensions..js (module.js:579:10)
node-pre-gyp ERR! stack at Module.load (module.js:487:32)
node-pre-gyp ERR! stack at tryModuleLoad (module.js:446:12)
node-pre-gyp ERR! stack at Function.Module._load (module.js:438:3)
node-pre-gyp ERR! stack at Module.require (module.js:497:17)
node-pre-gyp ERR! stack at require (internal/module.js:20:19)
node-pre-gyp ERR! stack at Object.<anonymous> (/usr/local/lib/node_modules/node-red/node_modules/@mapbox/node-pre-gyp/lib/util/versioning.js:8:21)
node-pre-gyp ERR! System Darwin 18.7.0
node-pre-gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/node-red/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /usr/local/lib/node_modules/node-red/node_modules/bcrypt
node-pre-gyp ERR! node -v v6.11.4
node-pre-gyp ERR! node-pre-gyp -v v1.0.10
npm WARN notsup Unsupported engine for node-red@3.0.2: wanted: {"node":">=14"} (current: {"node":"6.11.4","npm":"6.13.4"})
npm WARN notsup Not compatible with your version of node/npm: node-red@3.0.2

```

So i reasoned I needed to update node/npm:

```auto
jm:.node-red jm$ sudo npm rebuild

```

Lots of text, no obvious errors. Retry running NR:

```auto
jm:.node-red jm$ node-red
/usr/local/lib/node_modules/node-red/node_modules/fs-extra/lib/index.js:5
  ...require('./fs'),
  ^^^

SyntaxError: Unexpected token ...
    at createScript (vm.js:56:10)
    at Object.runInThisContext (vm.js:97:10)
    at Module._compile (module.js:542:28)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/usr/local/lib/node_modules/node-red/red.js:38:10)
jm:.node-red jm$

```

Suggestions?

---

<div class="post-metadata">

**Author:** ![CaptClaude](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/captclaude/32/2125_2.png) [@CaptClaude](https://discourse.nodered.org/u/CaptClaude)\
**Post date:** [16 October 2022 06:12 UTC](https://discourse.nodered.org/t/attempted-to-update-nr-late-at-night-now-nothing-works-solved/69096/2 "2022-10-16T06:12:22Z")

</div>

Problem (apparently) resolved.

Downloaded and installed

```auto
	•	Node.js v16.18.0 to /usr/local/bin/node
	•	npm v8.19.2 to /usr/local/bin/npm

```

Now it looks like I'm back in business. Sorry for the fire alarm.  
🤦🏼‍♂️

---

<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:** [15 December 2022 06:13 UTC](https://discourse.nodered.org/t/attempted-to-update-nr-late-at-night-now-nothing-works-solved/69096/3 "2022-12-15T06:13:03Z")

</div>

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