Node-Red hanging after update

Hi,

Last night update my Node red on Raspberry Pi3B, now it does not star up correctly.

Used - bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)

image

node-red start
30 Mar 08:19:40 - [info]

Welcome to Node-RED

30 Mar 08:19:40 - [info] Node-RED version: v1.0.4
30 Mar 08:19:40 - [info] Node.js version: v12.16.1
30 Mar 08:19:40 - [info] Linux 4.19.66-v7+ arm LE
30 Mar 08:19:41 - [info] Loading palette nodes
Initializing chat-platform lib, you should see this only once
Running at: /home/pi/.node-red/node_modules/chat-platform Version: 1.0.10

node-telegram-bot-api deprecated Automatic enabling of cancellation of promises is deprecated.
In the future, you will have to enable it yourself.
See https://github.com/yagop/node-telegram-bot-api/issues/319. internal/modules/cjs/loader.js:1158:30
30 Mar 08:19:52 - [info] RedBot version: 0.18.11 (node-red-contrib-chatbot)
30 Mar 08:20:14 - [info] Dashboard version 2.15.4 started at /ui
30 Mar 08:20:14 - [warn] ------------------------------------------------------
30 Mar 08:20:14 - [warn] [node-red-contrib-enocean/enocean-config-node] Error: The module '/home/pi/.node-red/node_modules/@serialport/bindings/build/Release/bindings.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 57. This version of Node.js requires
NODE_MODULE_VERSION 72. Please try re-compiling or re-installing
the module (for instance, using npm rebuild or npm install).
30 Mar 08:20:14 - [warn] [node-red-contrib-facebook/facebook] Error: The module '/home/pi/.node-red/node_modules/ursa/build/Release/ursaNative.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 57. This version of Node.js requires
NODE_MODULE_VERSION 72. Please try re-compiling or re-installing
the module (for instance, using npm rebuild or npm install). (line:5)
30 Mar 08:20:14 - [warn] [node-red-contrib-i2c/i2c] Error: The module '/home/pi/.node-red/node_modules/i2c-bus/build/Release/i2c.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 57. This version of Node.js requires
NODE_MODULE_VERSION 72. Please try re-compiling or re-installing
the module (for instance, using npm rebuild or npm install). (line:3)
30 Mar 08:20:14 - [warn] [node-red-contrib-ibm-watson-iot/wiotp] SyntaxError: Invalid or unexpected token
30 Mar 08:20:14 - [warn] [node-red-contrib-pca9685/pca9685] Error: The module '/home/pi/.node-red/node_modules/node-red-contrib-pca9685/node_modules/i2c-bus/build/Release/i2c.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 57. This version of Node.js requires
NODE_MODULE_VERSION 72. Please try re-compiling or re-installing
the module (for instance, using npm rebuild or npm install). (line:20)
30 Mar 08:20:14 - [warn] [node-red-contrib-ttn/ttn-app] Error: Failed to load gRPC binary module because it was not installed for the current system
Expected directory: node-v72-linux-arm-glibc
Found: [node-v57-linux-arm-glibc]
This problem can often be fixed by running "npm rebuild" on the current system
Original error: Cannot find module '/home/pi/.node-red/node_modules/grpc/src/node/extension_binary/node-v72-linux-arm-glibc/grpc_node.node'
Require stack:

  • /home/pi/.node-red/node_modules/grpc/src/grpc_extension.js
  • /home/pi/.node-red/node_modules/grpc/src/client_interceptors.js
  • /home/pi/.node-red/node_modules/grpc/src/client.js
  • /home/pi/.node-red/node_modules/grpc/index.js
  • /home/pi/.node-red/node_modules/ttn/dist/discovery/discovery.js
  • /home/pi/.node-red/node_modules/ttn/dist/discovery/index.js
  • /home/pi/.node-red/node_modules/ttn/dist/handler/handler.js
  • /home/pi/.node-red/node_modules/ttn/dist/handler/index.js
  • /home/pi/.node-red/node_modules/ttn/dist/index.js
  • /home/pi/.node-red/node_modules/node-red-contrib-ttn/ttn-app/ttn-app.js
  • /usr/lib/node_modules/node-red/node_modules/@node-red/registry/lib/loader.js
  • /usr/lib/node_modules/node-red/node_modules/@node-red/registry/lib/index.js
  • /usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/index.js
  • /usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/index.js
  • /usr/lib/node_modules/node-red/lib/red.js
  • /usr/lib/node_modules/node-red/red.js
    30 Mar 08:20:14 - [warn] [node-red-node-sqlite/sqlite] Error: Cannot find module '/home/pi/.node-red/node_modules/sqlite3/lib/binding/node-v72-linux-arm/node_sqlite3.node'
    Require stack:
  • /home/pi/.node-red/node_modules/sqlite3/lib/sqlite3.js
  • /home/pi/.node-red/node_modules/node-red-node-sqlite/sqlite.js
  • /usr/lib/node_modules/node-red/node_modules/@node-red/registry/lib/loader.js
  • /usr/lib/node_modules/node-red/node_modules/@node-red/registry/lib/index.js
  • /usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/index.js
  • /usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/index.js
  • /usr/lib/node_modules/node-red/lib/red.js
  • /usr/lib/node_modules/node-red/red.js
    30 Mar 08:20:14 - [warn] ------------------------------------------------------
    30 Mar 08:20:14 - [info] Settings file : /home/pi/.node-red/settings.js
    30 Mar 08:20:14 - [info] Context store : 'default' [module=memory]
    30 Mar 08:20:14 - [info] User directory : /home/pi/.node-red
    30 Mar 08:20:14 - [warn] Projects disabled : set editorTheme.projects.enabled=true to enable
    30 Mar 08:20:14 - [info] Flows file : /home/pi/.node-red/start
    30 Mar 08:20:14 - [warn]

Your flow credentials file is encrypted using a system-generated key.

If the system-generated key is lost for any reason, your credentials
file will not be recoverable, you will have to delete it and re-enter
your credentials.

You should set your own key using the 'credentialSecret' option in
your settings file. Node-RED will then re-encrypt your credentials
file using your chosen key the next time you deploy a change.

30 Mar 08:20:14 - [info] Starting flows
30 Mar 08:20:14 - [info] Started flows
30 Mar 08:20:14 - [info] Server now running at http://127.0.0.1:1880/

Not quite sure how you got into this situation, the upgrade should have coped with it I think, but as it says you need to rebuild the serial node. Probably easiest way is just to reinstall it.

cd ~/.node-red
npm install node-red-node-serialport

and restart node-red.

[Edit] Actually I see other nodes are in a similar situation, in which case easier to do

cd ~/.node-red
npm rebuild

I have attempted "npm rebuild" but it fails.

Do you use the below to upgrade, or are there a better way of doing it?

bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)

How do you expect us to know how to fix it if you don't give us any information.
Copy/paste the full output from the rebuild here.

The script is the right way, but possibly something went wrong. I presume when it ran it ran right through without showing any errors.

Re ran

npm rebuild

core-js@2.6.10 postinstall /home/pi/node_modules/core-js
node postinstall || echo "ignore"

Thank you for using core-js ( GitHub - zloirock/core-js: Standard Library ) for polyfilling JavaScript standard library!

The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:

core-js - Open Collective
Denis Pushkarev | creating core-js | Patreon

Also, the author of core-js ( zloirock (Denis Pushkarev) · GitHub ) is looking for a good job -)

grpc@1.24.2 install /home/pi/node_modules/grpc
node-pre-gyp install --fallback-to-build --library=static_library

node-pre-gyp WARN Using needle for node-pre-gyp https download
[grpc] Success: "/home/pi/node_modules/grpc/src/node/extension_binary/node-v72-linux-arm-glibc/grpc_node.node" is installed via remote
@types/bytebuffer@5.0.40 /home/pi/node_modules/@types/bytebuffer
@types/long@4.0.0 /home/pi/node_modules/@types/long
@types/node@12.12.11 /home/pi/node_modules/@types/node
abbrev@1.1.1 /home/pi/node_modules/abbrev
ansi-regex@2.1.1 /home/pi/node_modules/ansi-regex
aproba@1.2.0 /home/pi/node_modules/aproba
are-we-there-yet@1.1.5 /home/pi/node_modules/are-we-there-yet
delegates@1.0.0 /home/pi/node_modules/delegates
readable-stream@2.3.6 /home/pi/node_modules/readable-stream
core-util-is@1.0.2 /home/pi/node_modules/core-util-is
inherits@2.0.4 /home/pi/node_modules/inherits
isarray@1.0.0 /home/pi/node_modules/isarray
process-nextick-args@2.0.1 /home/pi/node_modules/process-nextick-args
safe-buffer@5.1.2 /home/pi/node_modules/readable-stream/node_modules/safe-buffer
string_decoder@1.1.1 /home/pi/node_modules/string_decoder
safe-buffer@5.1.2 /home/pi/node_modules/string_decoder/node_modules/safe-buffer
util-deprecate@1.0.2 /home/pi/node_modules/util-deprecate
ascli@1.0.1 /home/pi/node_modules/ascli
colour@0.7.1 /home/pi/node_modules/colour
optjs@3.2.2 /home/pi/node_modules/optjs
async-limiter@1.0.1 /home/pi/node_modules/async-limiter
babel-runtime@6.26.0 /home/pi/node_modules/babel-runtime
core-js@2.6.10 /home/pi/node_modules/core-js
regenerator-runtime@0.11.1 /home/pi/node_modules/regenerator-runtime
balanced-match@1.0.0 /home/pi/node_modules/balanced-match
bl@1.2.2 /home/pi/node_modules/bl
safe-buffer@5.2.0 /home/pi/node_modules/safe-buffer
brace-expansion@1.1.11 /home/pi/node_modules/brace-expansion
concat-map@0.0.1 /home/pi/node_modules/concat-map
buffer-equal-constant-time@1.0.1 /home/pi/node_modules/buffer-equal-constant-time
buffer-from@1.1.1 /home/pi/node_modules/buffer-from
bytebuffer@5.0.1 /home/pi/node_modules/bytebuffer
long@3.2.0 /home/pi/node_modules/long
callback-stream@1.1.0 /home/pi/node_modules/callback-stream
camelcase@2.1.1 /home/pi/node_modules/camelcase
chownr@1.1.3 /home/pi/node_modules/chownr
cliui@3.2.0 /home/pi/node_modules/cliui
string-width@1.0.2 /home/pi/node_modules/string-width
code-point-at@1.1.0 /home/pi/node_modules/code-point-at
is-fullwidth-code-point@1.0.0 /home/pi/node_modules/is-fullwidth-code-point
number-is-nan@1.0.1 /home/pi/node_modules/number-is-nan
strip-ansi@3.0.1 /home/pi/node_modules/strip-ansi
wrap-ansi@2.1.0 /home/pi/node_modules/wrap-ansi
commist@1.1.0 /home/pi/node_modules/commist
leven@2.1.0 /home/pi/node_modules/leven
minimist@1.2.0 /home/pi/node_modules/minimist
concat-stream@1.6.2 /home/pi/node_modules/concat-stream
typedarray@0.0.6 /home/pi/node_modules/typedarray
console-control-strings@1.1.0 /home/pi/node_modules/console-control-strings
d@1.0.1 /home/pi/node_modules/d
es5-ext@0.10.52 /home/pi/node_modules/es5-ext
es6-iterator@2.0.3 /home/pi/node_modules/es6-iterator
es6-symbol@3.1.3 /home/pi/node_modules/es6-symbol
ext@1.2.0 /home/pi/node_modules/ext
type@2.0.0 /home/pi/node_modules/ext/node_modules/type
next-tick@1.0.0 /home/pi/node_modules/next-tick
type@1.2.0 /home/pi/node_modules/type
debug@2.6.9 /home/pi/node_modules/debug
ms@2.0.0 /home/pi/node_modules/ms
decamelize@1.2.0 /home/pi/node_modules/decamelize
deep-extend@0.6.0 /home/pi/node_modules/deep-extend
detect-libc@1.0.3 /home/pi/node_modules/detect-libc
duplexify@3.7.1 /home/pi/node_modules/duplexify
end-of-stream@1.4.4 /home/pi/node_modules/end-of-stream
once@1.4.0 /home/pi/node_modules/once
wrappy@1.0.2 /home/pi/node_modules/wrappy
stream-shift@1.0.0 /home/pi/node_modules/stream-shift
ecdsa-sig-formatter@1.0.11 /home/pi/node_modules/ecdsa-sig-formatter
encoding@0.1.12 /home/pi/node_modules/encoding
iconv-lite@0.4.24 /home/pi/node_modules/iconv-lite
safer-buffer@2.1.2 /home/pi/node_modules/safer-buffer
es6-map@0.1.5 /home/pi/node_modules/es6-map
es6-set@0.1.5 /home/pi/node_modules/es6-set
es6-symbol@3.1.1 /home/pi/node_modules/es6-set/node_modules/es6-symbol
event-emitter@0.3.5 /home/pi/node_modules/event-emitter
extend@3.0.2 /home/pi/node_modules/extend
fs-minipass@1.2.7 /home/pi/node_modules/fs-minipass
minipass@2.9.0 /home/pi/node_modules/minipass
yallist@3.1.1 /home/pi/node_modules/yallist
fs.realpath@1.0.0 /home/pi/node_modules/fs.realpath
gauge@2.7.4 /home/pi/node_modules/gauge
has-unicode@2.0.1 /home/pi/node_modules/has-unicode
object-assign@4.1.1 /home/pi/node_modules/object-assign
signal-exit@3.0.2 /home/pi/node_modules/signal-exit
wide-align@1.1.3 /home/pi/node_modules/wide-align
glob@7.1.6 /home/pi/node_modules/glob
inflight@1.0.6 /home/pi/node_modules/inflight
minimatch@3.0.4 /home/pi/node_modules/minimatch
path-is-absolute@1.0.1 /home/pi/node_modules/path-is-absolute
glob-parent@3.1.0 /home/pi/node_modules/glob-parent
is-glob@3.1.0 /home/pi/node_modules/is-glob
is-extglob@2.1.1 /home/pi/node_modules/is-extglob
path-dirname@1.0.2 /home/pi/node_modules/path-dirname
glob-stream@6.1.0 /home/pi/node_modules/glob-stream
is-negated-glob@1.0.0 /home/pi/node_modules/is-negated-glob
ordered-read-streams@1.0.1 /home/pi/node_modules/ordered-read-streams
pumpify@1.5.1 /home/pi/node_modules/pumpify
pump@2.0.1 /home/pi/node_modules/pumpify/node_modules/pump
remove-trailing-separator@1.1.0 /home/pi/node_modules/remove-trailing-separator
to-absolute-glob@2.0.2 /home/pi/node_modules/to-absolute-glob
is-absolute@1.0.0 /home/pi/node_modules/is-absolute
is-relative@1.0.0 /home/pi/node_modules/is-relative
is-unc-path@1.0.0 /home/pi/node_modules/is-unc-path
unc-path-regex@0.1.2 /home/pi/node_modules/unc-path-regex
is-windows@1.0.2 /home/pi/node_modules/is-windows
unique-stream@2.3.1 /home/pi/node_modules/unique-stream
json-stable-stringify-without-jsonify@1.0.1 /home/pi/node_modules/json-stable-stringify-without-jsonify
through2-filter@3.0.0 /home/pi/node_modules/through2-filter
through2@2.0.5 /home/pi/node_modules/through2
xtend@4.0.2 /home/pi/node_modules/xtend
google-protobuf@3.10.0 /home/pi/node_modules/google-protobuf
grpc@1.24.2 /home/pi/node_modules/grpc
lodash.camelcase@4.3.0 /home/pi/node_modules/lodash.camelcase
lodash.clone@4.5.0 /home/pi/node_modules/lodash.clone
nan@2.14.0 /home/pi/node_modules/nan
node-pre-gyp@0.14.0 /home/pi/node_modules/grpc/node_modules/node-pre-gyp
detect-libc@1.0.3 /home/pi/node_modules/grpc/node_modules/detect-libc
mkdirp@0.5.1 /home/pi/node_modules/grpc/node_modules/mkdirp
minimist@0.0.8 /home/pi/node_modules/grpc/node_modules/mkdirp/node_modules/minimist
needle@2.4.0 /home/pi/node_modules/grpc/node_modules/needle
debug@3.2.6 /home/pi/node_modules/grpc/node_modules/debug
ms@2.1.2 /home/pi/node_modules/grpc/node_modules/ms
iconv-lite@0.4.24 /home/pi/node_modules/grpc/node_modules/iconv-lite
safer-buffer@2.1.2 /home/pi/node_modules/grpc/node_modules/safer-buffer
sax@1.2.4 /home/pi/node_modules/grpc/node_modules/sax
nopt@4.0.1 /home/pi/node_modules/grpc/node_modules/nopt
abbrev@1.1.1 /home/pi/node_modules/grpc/node_modules/abbrev
osenv@0.1.5 /home/pi/node_modules/grpc/node_modules/osenv
os-homedir@1.0.2 /home/pi/node_modules/grpc/node_modules/os-homedir
os-tmpdir@1.0.2 /home/pi/node_modules/grpc/node_modules/os-tmpdir
npm-packlist@1.4.6 /home/pi/node_modules/grpc/node_modules/npm-packlist
ignore-walk@3.0.3 /home/pi/node_modules/grpc/node_modules/ignore-walk
minimatch@3.0.4 /home/pi/node_modules/grpc/node_modules/minimatch
brace-expansion@1.1.11 /home/pi/node_modules/grpc/node_modules/brace-expansion
balanced-match@1.0.0 /home/pi/node_modules/grpc/node_modules/balanced-match
concat-map@0.0.1 /home/pi/node_modules/grpc/node_modules/concat-map
npm-bundled@1.0.6 /home/pi/node_modules/grpc/node_modules/npm-bundled
npmlog@4.1.2 /home/pi/node_modules/grpc/node_modules/npmlog
are-we-there-yet@1.1.5 /home/pi/node_modules/grpc/node_modules/are-we-there-yet
delegates@1.0.0 /home/pi/node_modules/grpc/node_modules/delegates
readable-stream@2.3.6 /home/pi/node_modules/grpc/node_modules/readable-stream
core-util-is@1.0.2 /home/pi/node_modules/grpc/node_modules/core-util-is
inherits@2.0.4 /home/pi/node_modules/grpc/node_modules/inherits
isarray@1.0.0 /home/pi/node_modules/grpc/node_modules/isarray
process-nextick-args@2.0.1 /home/pi/node_modules/grpc/node_modules/process-nextick-args
safe-buffer@5.1.2 /home/pi/node_modules/grpc/node_modules/safe-buffer
string_decoder@1.1.1 /home/pi/node_modules/grpc/node_modules/string_decoder
util-deprecate@1.0.2 /home/pi/node_modules/grpc/node_modules/util-deprecate
console-control-strings@1.1.0 /home/pi/node_modules/grpc/node_modules/console-control-strings
gauge@2.7.4 /home/pi/node_modules/grpc/node_modules/gauge
aproba@1.2.0 /home/pi/node_modules/grpc/node_modules/aproba
has-unicode@2.0.1 /home/pi/node_modules/grpc/node_modules/has-unicode
object-assign@4.1.1 /home/pi/node_modules/grpc/node_modules/object-assign
signal-exit@3.0.2 /home/pi/node_modules/grpc/node_modules/signal-exit
string-width@1.0.2 /home/pi/node_modules/grpc/node_modules/string-width
code-point-at@1.1.0 /home/pi/node_modules/grpc/node_modules/code-point-at
is-fullwidth-code-point@1.0.0 /home/pi/node_modules/grpc/node_modules/is-fullwidth-code-point
number-is-nan@1.0.1 /home/pi/node_modules/grpc/node_modules/number-is-nan
strip-ansi@3.0.1 /home/pi/node_modules/grpc/node_modules/strip-ansi
ansi-regex@2.1.1 /home/pi/node_modules/grpc/node_modules/ansi-regex
wide-align@1.1.3 /home/pi/node_modules/grpc/node_modules/wide-align
set-blocking@2.0.0 /home/pi/node_modules/grpc/node_modules/set-blocking
rc@1.2.8 /home/pi/node_modules/grpc/node_modules/rc
deep-extend@0.6.0 /home/pi/node_modules/grpc/node_modules/deep-extend
ini@1.3.5 /home/pi/node_modules/grpc/node_modules/ini
minimist@1.2.0 /home/pi/node_modules/grpc/node_modules/minimist
strip-json-comments@2.0.1 /home/pi/node_modules/grpc/node_modules/strip-json-comments
rimraf@2.7.1 /home/pi/node_modules/grpc/node_modules/rimraf
glob@7.1.4 /home/pi/node_modules/grpc/node_modules/glob
fs.realpath@1.0.0 /home/pi/node_modules/grpc/node_modules/fs.realpath
inflight@1.0.6 /home/pi/node_modules/grpc/node_modules/inflight
once@1.4.0 /home/pi/node_modules/grpc/node_modules/once
wrappy@1.0.2 /home/pi/node_modules/grpc/node_modules/wrappy
path-is-absolute@1.0.1 /home/pi/node_modules/grpc/node_modules/path-is-absolute
semver@5.7.1 /home/pi/node_modules/grpc/node_modules/semver
tar@4.4.13 /home/pi/node_modules/grpc/node_modules/tar
chownr@1.1.3 /home/pi/node_modules/grpc/node_modules/chownr
fs-minipass@1.2.7 /home/pi/node_modules/grpc/node_modules/fs-minipass
minipass@2.9.0 /home/pi/node_modules/grpc/node_modules/minipass
yallist@3.1.1 /home/pi/node_modules/grpc/node_modules/yallist
minizlib@1.3.3 /home/pi/node_modules/grpc/node_modules/minizlib
protobufjs@5.0.3 /home/pi/node_modules/protobufjs
yargs@3.32.0 /home/pi/node_modules/yargs
os-locale@1.4.0 /home/pi/node_modules/os-locale
lcid@1.0.0 /home/pi/node_modules/lcid
invert-kv@1.0.0 /home/pi/node_modules/invert-kv
window-size@0.1.4 /home/pi/node_modules/window-size
y18n@3.2.1 /home/pi/node_modules/y18n
help-me@1.1.0 /home/pi/node_modules/help-me
ignore-walk@3.0.3 /home/pi/node_modules/ignore-walk
ini@1.3.5 /home/pi/node_modules/ini
is-stream@1.1.0 /home/pi/node_modules/is-stream
jsonwebtoken@8.5.1 /home/pi/node_modules/jsonwebtoken
jws@3.2.2 /home/pi/node_modules/jws
jwa@1.4.1 /home/pi/node_modules/jwa
lodash.includes@4.3.0 /home/pi/node_modules/lodash.includes
lodash.isboolean@3.0.3 /home/pi/node_modules/lodash.isboolean
lodash.isinteger@4.0.4 /home/pi/node_modules/lodash.isinteger
lodash.isnumber@3.0.3 /home/pi/node_modules/lodash.isnumber
lodash.isplainobject@4.0.6 /home/pi/node_modules/lodash.isplainobject
lodash.isstring@4.0.1 /home/pi/node_modules/lodash.isstring
lodash.once@4.1.1 /home/pi/node_modules/lodash.once
ms@2.1.2 /home/pi/node_modules/jsonwebtoken/node_modules/ms
semver@5.7.1 /home/pi/node_modules/semver
minizlib@1.3.3 /home/pi/node_modules/minizlib
mkdirp@0.5.1 /home/pi/node_modules/mkdirp
minimist@0.0.8 /home/pi/node_modules/mkdirp/node_modules/minimist
mqtt@2.18.8 /home/pi/node_modules/mqtt
mqtt-packet@5.6.1 /home/pi/node_modules/mqtt-packet
pump@3.0.0 /home/pi/node_modules/pump
reinterval@1.1.0 /home/pi/node_modules/reinterval
split2@2.2.0 /home/pi/node_modules/split2
websocket-stream@5.5.0 /home/pi/node_modules/websocket-stream
ws@3.3.3 /home/pi/node_modules/ws
safe-buffer@5.1.2 /home/pi/node_modules/ws/node_modules/safe-buffer
ultron@1.1.1 /home/pi/node_modules/ultron
needle@2.4.0 /home/pi/node_modules/needle
debug@3.2.6 /home/pi/node_modules/needle/node_modules/debug
ms@2.1.2 /home/pi/node_modules/needle/node_modules/ms
sax@1.2.4 /home/pi/node_modules/sax
node-fetch@1.7.3 /home/pi/node_modules/node-fetch
node-pre-gyp@0.11.0 /home/pi/node_modules/node-pre-gyp
nopt@4.0.1 /home/pi/node_modules/nopt
osenv@0.1.5 /home/pi/node_modules/osenv
os-homedir@1.0.2 /home/pi/node_modules/os-homedir
os-tmpdir@1.0.2 /home/pi/node_modules/os-tmpdir
npm-packlist@1.4.6 /home/pi/node_modules/npm-packlist
npm-bundled@1.0.6 /home/pi/node_modules/npm-bundled
npmlog@4.1.2 /home/pi/node_modules/npmlog
set-blocking@2.0.0 /home/pi/node_modules/set-blocking
rc@1.2.8 /home/pi/node_modules/rc
strip-json-comments@2.0.1 /home/pi/node_modules/strip-json-comments
rimraf@2.7.1 /home/pi/node_modules/rimraf
tar@4.4.13 /home/pi/node_modules/tar
node-red-contrib-ttn@2.0.5 /home/pi/node_modules/node-red-contrib-ttn
ttn@2.3.3 /home/pi/node_modules/ttn
source-map-support@0.4.18 /home/pi/node_modules/source-map-support
source-map@0.5.7 /home/pi/node_modules/source-map
ttnapi@2.0.0 /home/pi/node_modules/ttnapi
node-red-node-intel-gpio@0.0.6 /home/pi/node_modules/node-red-node-intel-gpio

Seems like it did it now

but port 1880 seems to be used now

ode-red
30 Mar 12:07:18 - [info]

Welcome to Node-RED

30 Mar 12:07:18 - [info] Node-RED version: v1.0.4
30 Mar 12:07:18 - [info] Node.js version: v12.16.1
30 Mar 12:07:18 - [info] Linux 4.19.66-v7+ arm LE
30 Mar 12:07:19 - [info] Loading palette nodes
Initializing chat-platform lib, you should see this only once
Running at: /home/pi/.node-red/node_modules/chat-platform Version: 1.0.10

node-telegram-bot-api deprecated Automatic enabling of cancellation of promises is deprecated.
In the future, you will have to enable it yourself.
See https://github.com/yagop/node-telegram-bot-api/issues/319. internal/modules/cjs/loader.js:1158:30
30 Mar 12:07:32 - [info] RedBot version: 0.18.11 (node-red-contrib-chatbot)
30 Mar 12:07:56 - [info] Dashboard version 2.15.4 started at /ui
30 Mar 12:07:58 - [warn] ------------------------------------------------------
30 Mar 12:07:58 - [warn] [node-red-contrib-enocean/enocean-config-node] Error: The module '/home/pi/.node-red/node_modules/@serialport/bindings/build/Release/bindings.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 57. This version of Node.js requires
NODE_MODULE_VERSION 72. Please try re-compiling or re-installing
the module (for instance, using npm rebuild or npm install).
30 Mar 12:07:58 - [warn] [node-red-contrib-facebook/facebook] Error: The module '/home/pi/.node-red/node_modules/ursa/build/Release/ursaNative.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 57. This version of Node.js requires
NODE_MODULE_VERSION 72. Please try re-compiling or re-installing
the module (for instance, using npm rebuild or npm install). (line:5)
30 Mar 12:07:58 - [warn] [node-red-contrib-i2c/i2c] Error: The module '/home/pi/.node-red/node_modules/i2c-bus/build/Release/i2c.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 57. This version of Node.js requires
NODE_MODULE_VERSION 72. Please try re-compiling or re-installing
the module (for instance, using npm rebuild or npm install). (line:3)
30 Mar 12:07:58 - [warn] [node-red-contrib-ibm-watson-iot/wiotp] SyntaxError: Invalid or unexpected token
30 Mar 12:07:58 - [warn] [node-red-contrib-pca9685/pca9685] Error: The module '/home/pi/.node-red/node_modules/node-red-contrib-pca9685/node_modules/i2c-bus/build/Release/i2c.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 57. This version of Node.js requires
NODE_MODULE_VERSION 72. Please try re-compiling or re-installing
the module (for instance, using npm rebuild or npm install). (line:20)
30 Mar 12:07:58 - [warn] [node-red-contrib-ttn/ttn-app] Error: Failed to load gRPC binary module because it was not installed for the current system
Expected directory: node-v72-linux-arm-glibc
Found: [node-v57-linux-arm-glibc]
This problem can often be fixed by running "npm rebuild" on the current system
Original error: Cannot find module '/home/pi/.node-red/node_modules/grpc/src/node/extension_binary/node-v72-linux-arm-glibc/grpc_node.node'
Require stack:

  • /home/pi/.node-red/node_modules/grpc/src/grpc_extension.js
  • /home/pi/.node-red/node_modules/grpc/src/client_interceptors.js
  • /home/pi/.node-red/node_modules/grpc/src/client.js
  • /home/pi/.node-red/node_modules/grpc/index.js
  • /home/pi/.node-red/node_modules/ttn/dist/discovery/discovery.js
  • /home/pi/.node-red/node_modules/ttn/dist/discovery/index.js
  • /home/pi/.node-red/node_modules/ttn/dist/handler/handler.js
  • /home/pi/.node-red/node_modules/ttn/dist/handler/index.js
  • /home/pi/.node-red/node_modules/ttn/dist/index.js
  • /home/pi/.node-red/node_modules/node-red-contrib-ttn/ttn-app/ttn-app.js
  • /usr/lib/node_modules/node-red/node_modules/@node-red/registry/lib/loader.js
  • /usr/lib/node_modules/node-red/node_modules/@node-red/registry/lib/index.js
  • /usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/index.js
  • /usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/index.js
  • /usr/lib/node_modules/node-red/lib/red.js
  • /usr/lib/node_modules/node-red/red.js
    30 Mar 12:07:58 - [warn] [node-red-node-sqlite/sqlite] Error: Cannot find module '/home/pi/.node-red/node_modules/sqlite3/lib/binding/node-v72-linux-arm/node_sqlite3.node'
    Require stack:
  • /home/pi/.node-red/node_modules/sqlite3/lib/sqlite3.js
  • /home/pi/.node-red/node_modules/node-red-node-sqlite/sqlite.js
  • /usr/lib/node_modules/node-red/node_modules/@node-red/registry/lib/loader.js
  • /usr/lib/node_modules/node-red/node_modules/@node-red/registry/lib/index.js
  • /usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/index.js
  • /usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/index.js
  • /usr/lib/node_modules/node-red/lib/red.js
  • /usr/lib/node_modules/node-red/red.js
    30 Mar 12:07:58 - [warn] ------------------------------------------------------
    30 Mar 12:07:58 - [info] Settings file : /home/pi/.node-red/settings.js
    30 Mar 12:07:58 - [info] Context store : 'default' [module=memory]
    30 Mar 12:07:58 - [info] User directory : /home/pi/.node-red
    30 Mar 12:07:58 - [warn] Projects disabled : set editorTheme.projects.enabled=true to enable
    30 Mar 12:07:58 - [info] Flows file : /home/pi/.node-red/flows_raspberrypi.json
    30 Mar 12:07:58 - [error] Unable to listen on http://127.0.0.1:1880/
    30 Mar 12:07:58 - [error] Error: port in use

sudo netstat -ltup
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:ssh 0.0.0.0:* LISTEN 500/sshd
tcp 0 0 0.0.0.0:1880 0.0.0.0:* LISTEN 343/node-red
tcp 0 0 0.0.0.0:1883 0.0.0.0:* LISTEN 450/mosquitto
tcp 0 0 0.0.0.0:5900 0.0.0.0:* LISTEN 477/vncserver-x11-c
tcp6 0 0 [::]:ssh [::]:* LISTEN 500/sshd
tcp6 0 0 [::]:1883 [::]:* LISTEN 450/mosquitto
tcp6 0 0 [::]:5900 [::]:* LISTEN 477/vncserver-x11-c
udp 0 0 0.0.0.0:49020 0.0.0.0:* 423/avahi-daemon: r
udp 0 0 0.0.0.0:bootpc 0.0.0.0:* 405/dhcpcd
udp 0 0 0.0.0.0:mdns 0.0.0.0:* 423/avahi-daemon: r
udp6 0 0 [::]:mdns [::]:* 423/avahi-daemon: r
udp6 0 0 [::]:33556 [::]:* 423/avahi-daemon: r

You ran npm rebuild from the wrong directory. As with all non-global npm commands it must be run from ~/.node-red

The port in use error is because node-red is already running. Use node-red-stop and node-red-start to stop and start it.

pi@raspberrypi:~/.node-red $ npm rebuild

i2c@0.2.3 install /home/pi/.node-red/node_modules/i2c
node-gyp rebuild

make: Entering directory '/home/pi/.node-red/node_modules/i2c/build'
CXX(target) Release/obj.target/i2c/src/i2c.o
In file included from ../node_modules/nan/nan.h:190:0,
from ../src/i2c.cc:3:
../node_modules/nan/nan_maybe_43_inl.h: In function ‘Nan::Maybe Nan::ForceSet(v8::Localv8::Object, v8::Localv8::Value, v8::Localv8::Value, v8::PropertyAttribute)’:
../node_modules/nan/nan_maybe_43_inl.h:88:15: error: ‘class v8::Object’ has no member named ‘ForceSet’
return obj->ForceSet(GetCurrentContext(), key, value, attribs);
^
In file included from ../node_modules/nan/nan_converters.h:59:0,
from ../node_modules/nan/nan.h:195,
from ../src/i2c.cc:3:
../node_modules/nan/nan_converters_43_inl.h: In static member function ‘static Nan::imp::ToFactoryBasev8::Boolean::return_t Nan::imp::ToFactoryv8::Boolean::convert(v8::Localv8::Value)’:
../node_modules/nan/nan_converters_43_inl.h:15:45: warning: ‘v8::MaybeLocalv8::Boolean v8::Value::ToBoolean(v8::Localv8::Context) const’ is deprecated (declared at /home/pi/.cache/node-gyp/12.16.1/include/node/v8.h:2663): ToBoolean can never throw. Use Local version. [-Wdeprecated-declarations]
return val->To ## TYPE(GetCurrentContext());
^
../node_modules/nan/nan_converters_43_inl.h:18:1: note: in expansion of macro ‘X’
X(Boolean)
^
../node_modules/nan/nan_converters_43_inl.h: In static member function ‘static Nan::imp::ValueFactoryBase::return_t Nan::imp::ToFactory::convert(v8::Localv8::Value)’:
../node_modules/nan/nan_converters_43_inl.h:31:48: warning: ‘v8::Maybe v8::Value::BooleanValue(v8::Localv8::Context) const’ is deprecated (declared at /home/pi/.cache/node-gyp/12.16.1/include/node/v8.h:2701): BooleanValue can never throw. Use Isolate version. [-Wdeprecated-declarations]
return val->NAME ## Value(GetCurrentContext());
^
../node_modules/nan/nan_converters_43_inl.h:34:1: note: in expansion of macro ‘X’
X(bool, Boolean)
^
In file included from ../node_modules/nan/nan_new.h:189:0,
from ../node_modules/nan/nan.h:196,
from ../src/i2c.cc:3:
../node_modules/nan/nan_implementation_12_inl.h: In static member function ‘static Nan::imp::FactoryBasev8::Function::return_t Nan::imp::Factoryv8::Function::New(Nan::FunctionCallback, v8::Localv8::Value)’:
../node_modules/nan/nan_implementation_12_inl.h:109:32: error: no matching function for call to ‘v8::Function::New(v8::Isolate*&, void (&)(const v8::FunctionCallbackInfov8::Value&), v8::Localv8::Object&)’
, obj));
^
../node_modules/nan/nan_implementation_12_inl.h:109:32: note: candidate is:
In file included from /home/pi/.cache/node-gyp/12.16.1/include/node/node.h:63:0,
from ../src/i2c.cc:1:
/home/pi/.cache/node-gyp/12.16.1/include/node/v8.h:4275:31: note: static v8::MaybeLocalv8::Function v8::Function::New(v8::Localv8::Context, v8::FunctionCallback, v8::Localv8::Value, int, v8::ConstructorBehavior, v8::SideEffectType)
static MaybeLocal New(
^
/home/pi/.cache/node-gyp/12.16.1/include/node/v8.h:4275:31: note: no known conversion for argument 1 from ‘v8::Isolate*’ to ‘v8::Localv8::Context
In file included from ../node_modules/nan/nan_new.h:189:0,
from ../node_modules/nan/nan.h:196,
from ../src/i2c.cc:3:
../node_modules/nan/nan_implementation_12_inl.h: In static member function ‘static Nan::imp::FactoryBasev8::StringObject::return_t Nan::imp::Factoryv8::StringObject::New(v8::Localv8::String)’:
../node_modules/nan/nan_implementation_12_inl.h:345:37: error: no matching function for call to ‘v8::StringObject::New(v8::Localv8::String&)’
return v8::StringObject::New(value).Asv8::StringObject();
^
../node_modules/nan/nan_implementation_12_inl.h:345:37: note: candidate is:
In file included from /home/pi/.cache/node-gyp/12.16.1/include/node/node.h:63:0,
from ../src/i2c.cc:1:
/home/pi/.cache/node-gyp/12.16.1/include/node/v8.h:5531:23: note: static v8::Localv8::Value v8::StringObject::New(v8::Isolate*, v8::Localv8::String)
static Local New(Isolate* isolate, Local value);
^
/home/pi/.cache/node-gyp/12.16.1/include/node/v8.h:5531:23: note: candidate expects 2 arguments, 1 provided
In file included from ../node_modules/nan/nan_new.h:189:0,
from ../node_modules/nan/nan.h:196,
from ../src/i2c.cc:3:
../node_modules/nan/nan_implementation_12_inl.h:345:58: error: expected primary-expression before ‘>’ token
return v8::StringObject::New(value).Asv8::StringObject();
^
../node_modules/nan/nan_implementation_12_inl.h:345:60: error: expected primary-expression before ‘)’ token
return v8::StringObject::New(value).Asv8::StringObject();
^
In file included from ../src/i2c.cc:3:0:
../node_modules/nan/nan.h: In function ‘v8::Localv8::Value Nan::MakeCallback(v8::Localv8::Object, v8::Localv8::Function, int, v8::Localv8::Value)’:
../node_modules/nan/nan.h:817:60: warning: ‘v8::Localv8::Value node::MakeCallback(v8::Isolate
, v8::Localv8::Object, v8::Localv8::Function, int, v8::Localv8::Value)’ is deprecated (declared at /home/pi/.cache/node-gyp/12.16.1/include/node/node.h:173): Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
v8::Isolate::GetCurrent(), target, func, argc, argv);
^
../node_modules/nan/nan.h: In function ‘v8::Localv8::Value Nan::MakeCallback(v8::Localv8::Object, v8::Localv8::String, int, v8::Localv8::Value
)’:
../node_modules/nan/nan.h:831:62: warning: ‘v8::Localv8::Value node::MakeCallback(v8::Isolate*, v8::Localv8::Object, v8::Localv8::String, int, v8::Localv8::Value)’ is deprecated (declared at /home/pi/.cache/node-gyp/12.16.1/include/node/node.h:166): Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
v8::Isolate::GetCurrent(), target, symbol, argc, argv);
^
../node_modules/nan/nan.h: In function ‘v8::Localv8::Value Nan::MakeCallback(v8::Localv8::Object, const char
, int, v8::Localv8::Value)’:
../node_modules/nan/nan.h:845:62: warning: ‘v8::Localv8::Value node::MakeCallback(v8::Isolate
, v8::Localv8::Object, const char*, int, v8::Localv8::Value)’ is deprecated (declared at /home/pi/.cache/node-gyp/12.16.1/include/node/node.h:159): Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
v8::Isolate::GetCurrent(), target, method, argc, argv);
^
../node_modules/nan/nan.h: In constructor ‘Nan::Utf8String::Utf8String(v8::Localv8::Value)’:
../node_modules/nan/nan.h:890:53: error: no matching function for call to ‘v8::Value::ToString()’
v8::Localv8::String string = from->ToString();
^
../node_modules/nan/nan.h:890:53: note: candidates are:
In file included from /home/pi/.cache/node-gyp/12.16.1/include/node/node.h:63:0,
from ../src/i2c.cc:1:
/home/pi/.cache/node-gyp/12.16.1/include/node/v8.h:2668:44: note: v8::MaybeLocalv8::String v8::Value::ToString(v8::Localv8::Context) const
V8_WARN_UNUSED_RESULT MaybeLocal ToString(
^
/home/pi/.cache/node-gyp/12.16.1/include/node/v8.h:2668:44: note: candidate expects 1 argument, 0 provided
In file included from /home/pi/.cache/node-gyp/12.16.1/include/node/v8-internal.h:14:0,
from /home/pi/.cache/node-gyp/12.16.1/include/node/v8.h:27,
from /home/pi/.cache/node-gyp/12.16.1/include/node/node.h:63,
from ../src/i2c.cc:1:
/home/pi/.cache/node-gyp/12.16.1/include/node/v8.h:2684:31: note: v8::Localv8::String v8::Value::ToString(v8::Isolate
) const
Local ToString(Isolate* isolate) const);
^
/home/pi/.cache/node-gyp/12.16.1/include/node/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^
/home/pi/.cache/node-gyp/12.16.1/include/node/v8.h:2684:31: note: candidate expects 1 argument, 0 provided
Local ToString(Isolate* isolate) const);
^
/home/pi/.cache/node-gyp/12.16.1/include/node/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^
In file included from ../src/i2c.cc:3:0:
../node_modules/nan/nan.h:900:74: error: no matching function for call to ‘v8::String::WriteUtf8(char*&, int, int, const int&)’
length_ = string->WriteUtf8(str_, static_cast(len), 0, flags);
^
../node_modules/nan/nan.h:900:74: note: candidate is:
In file included from /home/pi/.cache/node-gyp/12.16.1/include/node/node.h:63:0,
from ../src/i2c.cc:1:
/home/pi/.cache/node-gyp/12.16.1/include/node/v8.h:2878:7: note: int v8::String::WriteUtf8(v8::Isolate*, char*, int, int*, int) const
int WriteUtf8(Isolate* isolate, char* buffer, int length = -1,
^
/home/pi/.cache/node-gyp/12.16.1/include/node/v8.h:2878:7: note: no known conversion for argument 1 from ‘char*’ to ‘v8::Isolate*’
In file included from ../src/i2c.cc:3:0:
../node_modules/nan/nan.h: In member function ‘bool Nan::Callback::operator==(const Nan::Callback&) const’:
../node_modules/nan/nan.h:1371:61: warning: ‘v8::Localv8::Value v8::Object::Get(uint32_t)’ is deprecated (declared at /home/pi/.cache/node-gyp/12.16.1/include/node/v8.h:3557): Use maybe version [-Wdeprecated-declarations]
v8::Localv8::Value a = New(handle)->Get(kCallbackIndex);
^
../node_modules/nan/nan.h:1372:67: warning: ‘v8::Localv8::Value v8::Object::Get(uint32_t)’ is deprecated (declared at /home/pi/.cache/node-gyp/12.16.1/include/node/v8.h:3557): Use maybe version [-Wdeprecated-declarations]
v8::Localv8::Value b = New(other.handle)->Get(kCallbackIndex);
^
../node_modules/nan/nan.h: In member function ‘v8::Localv8::Function Nan::Callback::GetFunction() const’:
../node_modules/nan/nan.h:1403:56: warning: ‘v8::Localv8::Value v8::Object::Get(uint32_t)’ is deprecated (declared at /home/pi/.cache/node-gyp/12.16.1/include/node/v8.h:3557): Use maybe version [-Wdeprecated-declarations]
return scope.Escape(New(handle)->Get(kCallbackIndex)
^
../node_modules/nan/nan.h: In member function ‘bool Nan::Callback::IsEmpty() const’:
../node_modules/nan/nan.h:1409:43: warning: ‘v8::Localv8::Value v8::Object::Get(uint32_t)’ is deprecated (declared at /home/pi/.cache/node-gyp/12.16.1/include/node/v8.h:3557): Use maybe version [-Wdeprecated-declarations]
return New(handle)->Get(kCallbackIndex)->IsUndefined();
^
../node_modules/nan/nan.h: In member function ‘v8::Localv8::Value Nan::Callback::Call_(v8::Isolate*, v8::Localv8::Object, int, v8::Localv8::Value) const’:
../node_modules/nan/nan.h:1447:27: warning: ‘v8::Localv8::Value v8::Object::Get(uint32_t)’ is deprecated (declared at /home/pi/.cache/node-gyp/12.16.1/include/node/v8.h:3557): Use maybe version [-Wdeprecated-declarations]
Get(kCallbackIndex).Asv8::Function();
^
../node_modules/nan/nan.h:1463:5: warning: ‘v8::Localv8::Value node::MakeCallback(v8::Isolate
, v8::Localv8::Object, v8::Localv8::Function, int, v8::Localv8::Value)’ is deprecated (declared at /home/pi/.cache/node-gyp/12.16.1/include/node/node.h:173): Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
));
^
../node_modules/nan/nan.h: In member function ‘void Nan::AsyncWorker::SaveToPersistent(const char
, const v8::Localv8::Value&)’:
../node_modules/nan/nan.h:1518:64: warning: ‘bool v8::Object::Set(v8::Localv8::Value, v8::Localv8::Value)’ is deprecated (declared at /home/pi/.cache/node-gyp/12.16.1/include/node/v8.h:3498): Use maybe version [-Wdeprecated-declarations]
New(persistentHandle)->Set(New(key).ToLocalChecked(), value);
^
../node_modules/nan/nan.h: In member function ‘void Nan::AsyncWorker::SaveToPersistent(const v8::Localv8::String&, const v8::Localv8::Value&)’:
../node_modules/nan/nan.h:1524:42: warning: ‘bool v8::Object::Set(v8::Localv8::Value, v8::Localv8::Value)’ is deprecated (declared at /home/pi/.cache/node-gyp/12.16.1/include/node/v8.h:3498): Use maybe version [-Wdeprecated-declarations]
New(persistentHandle)->Set(key, value);
^
../node_modules/nan/nan.h: In member function ‘void Nan::AsyncWorker::SaveToPersistent(uint32_t, const v8::Localv8::Value&)’:
../node_modules/nan/nan.h:1530:44: warning: ‘bool v8::Object::Set(uint32_t, v8::Localv8::Value)’ is deprecated (declared at /home/pi/.cache/node-gyp/12.16.1/include/node/v8.h:3507): Use maybe version [-Wdeprecated-declarations]
New(persistentHandle)->Set(index, value);
^
../node_modules/nan/nan.h: In member function ‘v8::Localv8::Value Nan::AsyncWorker::GetFromPersistent(const char*) const’:
../node_modules/nan/nan.h:1536:61: warning: ‘v8::Localv8::Value v8::Object::Get(v8::Localv8::Value)’ is deprecated (declared at /home/pi/.cache/node-gyp/12.16.1/include/node/v8.h:3553): Use maybe version [-Wdeprecated-declarations]
New(persistentHandle)->Get(New(key).ToLocalChecked()));
^
../node_modules/nan/nan.h: In member function ‘v8::Localv8::Value Nan::AsyncWorker::GetFromPersistent(const v8::Localv8::String&) const’:
../node_modules/nan/nan.h:1542:55: warning: ‘v8::Localv8::Value v8::Object::Get(v8::Localv8::Value)’ is deprecated (declared at /home/pi/.cache/node-gyp/12.16.1/include/node/v8.h:3553): Use maybe version [-Wdeprecated-declarations]
return scope.Escape(New(persistentHandle)->Get(key));
^
../node_modules/nan/nan.h: In member function ‘v8::Localv8::Value Nan::AsyncWorker::GetFromPersistent(uint32_t) const’:
../node_modules/nan/nan.h:1547:57: warning: ‘v8::Localv8::Value v8::Object::Get(uint32_t)’ is deprecated (declared at /home/pi/.cache/node-gyp/12.16.1/include/node/v8.h:3557): Use maybe version [-Wdeprecated-declarations]
return scope.Escape(New(persistentHandle)->Get(index));
^
In file included from /usr/include/c++/4.8/cassert:43:0,
from /home/pi/.cache/node-gyp/12.16.1/include/node/node_object_wrap.h:26,
from ../node_modules/nan/nan.h:49,
from ../src/i2c.cc:3:
../node_modules/nan/nan_object_wrap.h: In destructor ‘virtual Nan::ObjectWrap::~ObjectWrap()’:
../node_modules/nan/nan_object_wrap.h:24:25: error: ‘class Nan::Persistentv8::Object’ has no member named ‘IsNearDeath’
assert(persistent().IsNearDeath());
^
In file included from ../node_modules/nan/nan.h:2192:0,
from ../src/i2c.cc:3:
../node_modules/nan/nan_object_wrap.h: In member function ‘void Nan::ObjectWrap::MakeWeak()’:
../node_modules/nan/nan_object_wrap.h:67:34: warning: ‘void v8::PersistentBase::MarkIndependent() [with T = v8::Object]’ is deprecated (declared at /home/pi/.cache/node-gyp/12.16.1/include/node/v8.h:10256): Weak objects are always considered independent. Use TracedGlobal when trying to use EmbedderHeapTracer. Use a strong handle when trying to keep an object alive. [-Wdeprecated-declarations]
persistent().MarkIndependent();
^
In file included from /usr/include/c++/4.8/cassert:43:0,
from /home/pi/.cache/node-gyp/12.16.1/include/node/node_object_wrap.h:26,
from ../node_modules/nan/nan.h:49,
from ../src/i2c.cc:3:
../node_modules/nan/nan_object_wrap.h: In static member function ‘static void Nan::ObjectWrap::WeakCallback(const v8::WeakCallbackInfoNan::ObjectWrap&)’:
../node_modules/nan/nan_object_wrap.h:124:26: error: ‘class Nan::Persistentv8::Object’ has no member named ‘IsNearDeath’
assert(wrap->handle_.IsNearDeath());
^
../src/i2c.cc: In function ‘void SetAddress(const Nan::FunctionCallbackInfov8::Value&)’:
../src/i2c.cc:38:30: error: no matching function for call to ‘v8::Value::Int32Value()’
addr = info[0]->Int32Value();
^
../src/i2c.cc:38:30: note: candidate is:
In file included from /home/pi/.cache/node-gyp/12.16.1/include/node/node.h:63:0,
from ../src/i2c.cc:1:
/home/pi/.cache/node-gyp/12.16.1/include/node/v8.h:2709:40: note: v8::Maybe v8::Value::Int32Value(v8::Localv8::Context) const
V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local context) const;
^
/home/pi/.cache/node-gyp/12.16.1/include/node/v8.h:2709:40: note: candidate expects 1 argument, 0 provided
../src/i2c.cc: In function ‘void Scan(const Nan::FunctionCallbackInfov8::Value&)’:
../src/i2c.cc:60:43: warning: ‘bool v8::Object::Set(uint32_t, v8::Localv8::Value)’ is deprecated (declared at /home/pi/.cache/node-gyp/12.16.1/include/node/v8.h:3507): Use maybe version [-Wdeprecated-declarations]
results->Set(i, Nan::New(res));
^
../src/i2c.cc: In function ‘void Open(const Nan::FunctionCallbackInfov8::Value&)’:
../src/i2c.cc:84:35: error: no matching function for call to ‘v8::String::Utf8Value::Utf8Value(v8::Localv8::Value)’
String::Utf8Value device(info[0]);
^
../src/i2c.cc:84:35: note: candidate is:
In file included from /home/pi/.cache/node-gyp/12.16.1/include/node/node.h:63:0,
from ../src/i2c.cc:1:
/home/pi/.cache/node-gyp/12.16.1/include/node/v8.h:3135:5: note: v8::String::Utf8Value::Utf8Value(v8::Isolate*, v8::Localv8::Value)
Utf8Value(Isolate* isolate, Localv8::Value obj);
^
/home/pi/.cache/node-gyp/12.16.1/include/node/v8.h:3135:5: note: candidate expects 2 arguments, 1 provided
../src/i2c.cc: In function ‘void Read(const Nan::FunctionCallbackInfov8::Value&)’:
../src/i2c.cc:103:33: error: no matching function for call to ‘v8::Value::Int32Value()’
int len = info[0]->Int32Value();
^
../src/i2c.cc:103:33: note: candidate is:
In file included from /home/pi/.cache/node-gyp/12.16.1/include/node/node.h:63:0,
from ../src/i2c.cc:1:
/home/pi/.cache/node-gyp/12.16.1/include/node/v8.h:2709:40: note: v8::Maybe v8::Value::Int32Value(v8::Localv8::Context) const
V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local context) const;
^
/home/pi/.cache/node-gyp/12.16.1/include/node/v8.h:2709:40: note: candidate expects 1 argument, 0 provided
../src/i2c.cc:114:45: warning: ‘bool v8::Object::Set(uint32_t, v8::Localv8::Value)’ is deprecated (declared at /home/pi/.cache/node-gyp/12.16.1/include/node/v8.h:3507): Use maybe version [-Wdeprecated-declarations]
data->Set(i, Nan::New(buf[i]));
^
../src/i2c.cc: In function ‘void ReadBlock(const Nan::FunctionCallbackInfov8::Value&)’:
../src/i2c.cc:154:36: error: no matching function for call to ‘v8::Value::Int32Value()’
int8_t cmd = info[0]->Int32Value();
^
../src/i2c.cc:154:36: note: candidate is:
In file included from /home/pi/.cache/node-gyp/12.16.1/include/node/node.h:63:0,
from ../src/i2c.cc:1:
/home/pi/.cache/node-gyp/12.16.1/include/node/v8.h:2709:40: note: v8::Maybe v8::Value::Int32Value(v8::Localv8::Context) const
V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local context) const;
^
th(buffer->ToObject());
^
../src/i2c.cc:193:53: note: candidates are:
In file included from /home/pi/.cache/node-gyp/12.16.1/include/node/node.h:63:0,
from ../src/i2c.cc:1:
/home/pi/.cache/node-gyp/12.16.1/include/node/v8.h:2672:44: note: v8::MaybeLocalv8::Object v8::Value::ToObject(v8::Localv8::Context) const
V8_WARN_UNUSED_RESULT MaybeLocal ToObject(
^
/home/pi/.cache/node-gyp/12.16.1/include/node/v8.h:2672:44: note: candidate expects 1 argument, 0 provided
In file included from /home/pi/.cache/node-gyp/12.16.1/include/node/v8-internal.h:14:0,
from /home/pi/.cache/node-gyp/12.16.1/include/node/v8.h:27,
from /home/pi/.cache/node-gyp/12.16.1/include/node/node.h:63,
from ../src/i2c.cc:1:
/home/pi/.cache/node-gyp/12.16.1/include/node/v8.h:2686:31: note: v8::Localv8::Object v8::Value::ToObject(v8::Isolate*) const
Local ToObject(Isolate* isolate) const);
^
/home/pi/.cache/node-gyp/12.16.1/include/node/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^
/home/pi/.cache/node-gyp/12.16.1/include/node/v8.h:2686:31: note: candidate expects 1 argument, 0 provided
Local ToObject(Isolate* isolate) const);
^
/home/pi/.cache/node-gyp/12.16.1/include/node/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^
../src/i2c.cc:194:52: error: no matching function for call to ‘v8::Value::ToObject()’
char* data = node::Buffer::Data(buffer->ToObject());
^
../src/i2c.cc:194:52: note: candidates are:
In file included from /home/pi/.cache/node-gyp/12.16.1/include/node/node.h:63:0,
from ../src/i2c.cc:1:
/home/pi/.cache/node-gyp/12.16.1/include/node/v8.h:2672:44: note: v8::MaybeLocalv8::Object v8::Value::ToObject(v8::Localv8::Context) const
V8_WARN_UNUSED_RESULT MaybeLocal ToObject(
^
/home/pi/.cache/node-gyp/12.16.1/include/node/v8.h:2672:44: note: candidate expects 1 argument, 0 provided
In file included from /home/pi/.cache/node-gyp/12.16.1/include/node/v8-internal.h:14:0,
from /home/pi/.cache/node-gyp/12.16.1/include/node/v8.h:27,
from /home/pi/.cache/node-gyp/12.16.1/include/node/node.h:63,
from ../src/i2c.cc:1:
/home/pi/.cache/node-gyp/12.16.1/include/node/v8.h:2686:31: note: v8::Localv8::Object v8::Value::ToObject(v8::Isolate*) const
Local ToObject(Isolate* isolate) const);
^
/home/pi/.cache/node-gyp/12.16.1/include/node/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^
/home/pi/.cache/node-gyp/12.16.1/include/node/v8.h:2686:31: note: candidate expects 1 argument, 0 provided
Local ToObject(Isolate* isolate) const);
^
/home/pi/.cache/node-gyp/12.16.1/include/node/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^
../src/i2c.cc: In function ‘void WriteByte(const Nan::FunctionCallbackInfov8::Value&)’:
../src/i2c.cc:213:37: error: no matching function for call to ‘v8::Value::Int32Value()’
int8_t byte = info[0]->Int32Value();
^
../src/i2c.cc:213:37: note: candidate is:
In file included from /home/pi/.cache/node-gyp/12.16.1/include/node/node.h:63:0,
from ../src/i2c.cc:1:
/home/pi/.cache/node-gyp/12.16.1/include/node/v8.h:2709:40: note: v8::Maybe v8::Value::Int32Value(v8::Localv8::Context) const
V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local context) const;
^
/home/pi/.cache/node-gyp/12.16.1/include/node/v8.h:2709:40: note: candidate expects 1 argument, 0 provided
../src/i2c.cc: In function ‘void WriteBlock(const Nan::FunctionCallbackInfov8::Value&)’:
../src/i2c.cc:232:36: error: no matching function for call to ‘v8::Value::Int32Value()’
int8_t cmd = info[0]->Int32Value();
^
../src/i2c.cc:232:36: note: candidate is:
In file included from /home/pi/.cache/node-gyp/12.16.1/include/node/node.h:63:0,
from ../src/i2c.cc:1:
/home/pi/.cache/node-gyp/12.16.1/include/node/v8.h:2709:40: note: v8::Maybe v8::Value::Int32Value(v8::Localv8::Context) const
V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local context) const;
^
/home/pi/.cache/node-gyp/12.16.1/include/node/v8.h:2709:40: note: candidate expects 1 argument, 0 provided
../src/i2c.cc:233:53: error: no matching function for call to ‘v8::Value::ToObject()’
int len = node::Buffer::Length(buffer->ToObject());
^
../src/i2c.cc:233:53: note: candidates are:
In file included from /home/pi/.cache/node-gyp/12.16.1/include/node/node.h:63:0,
from ../src/i2c.cc:1:
/home/pi/.cache/node-gyp/12.16.1/include/node/v8.h:2672:44: note: v8::MaybeLocalv8::Object v8::Value::ToObject(v8::Localv8::Context) const
V8_WARN_UNUSED_RESULT MaybeLocal ToObject(
^
/home/pi/.cache/node-gyp/12.16.1/include/node/v8.h:2672:44: note: candidate expects 1 argument, 0 provided
In file included from /home/pi/.cache/node-gyp/12.16.1/include/node/v8-internal.h:14:0,
from /home/pi/.cache/node-gyp/12.16.1/include/node/v8.h:27,
from /home/pi/.cache/node-gyp/12.16.1/include/node/node.h:63,
from ../src/i2c.cc:1:
/home/pi/.cache/node-gyp/12.16.1/include/node/v8.h:2686:31: note: v8::Localv8::Object v8::Value::ToObject(v8::Isolate*) const
Local ToObject(Isolate* isolate) const);
^
/home/pi/.cache/node-gyp/12.16.1/include/node/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^
/home/pi/.cache/node-gyp/12.16.1/include/node/v8.h:2686:31: note: candidate expects 1 argument, 0 provided
Local ToObject(Isolate* isolate) const);
^
/home/pi/.cache/node-gyp/12.16.1/include/node/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^
../src/i2c.cc:234:52: error: no matching function for call to ‘v8::Value::ToObject()’
char* data = node::Buffer::Data(buffer->ToObject());
^
../src/i2c.cc:234:52: note: candidates are:
In file included from /home/pi/.cache/node-gyp/12.16.1/include/node/node.h:63:0,
from ../src/i2c.cc:1:
/home/pi/.cache/node-gyp/12.16.1/include/node/v8.h:2672:44: note: v8::MaybeLocalv8::Object v8::Value::ToObject(v8::Localv8::Context) const
V8_WARN_UNUSED_RESULT MaybeLocal ToObject(
^
/home/pi/.cache/node-gyp/12.16.1/include/node/v8.h:2672:44: note: candidate expects 1 argument, 0 provided
In file included from /home/pi/.cache/node-gyp/12.16.1/include/node/v8-internal.h:14:0,
from /home/pi/.cache/node-gyp/12.16.1/include/node/v8.h:27,
from /home/pi/.cache/node-gyp/12.16.1/include/node/node.h:63,
from ../src/i2c.cc:1:
/home/pi/.cache/node-gyp/12.16.1/include/node/v8.h:2686:31: note: v8::Localv8::Object v8::Value::ToObject(v8::Isolate*) const
Local ToObject(Isolate* isolate) const);
^

                                    ^

/home/pi/.cache/node-gyp/12.16.1/include/node/v8.h:2709:40: note: candidate expects 1 argument, 0 provided
../src/i2c.cc: At global scope:
../src/i2c.cc:270:11: error: variable or field ‘Init’ declared void
void Init(Handle exports) {
^
../src/i2c.cc:270:11: error: ‘Handle’ was not declared in this scope
../src/i2c.cc:270:24: error: expected primary-expression before ‘>’ token
void Init(Handle exports) {
^
../src/i2c.cc:270:26: error: ‘exports’ was not declared in this scope
void Init(Handle exports) {
^
In file included from ../src/i2c.cc:1:0:
../src/i2c.cc:295:18: error: ‘Init’ was not declared in this scope
NODE_MODULE(i2c, Init)
^
/home/pi/.cache/node-gyp/12.16.1/include/node/node.h:601:36: note: in definition of macro ‘NODE_MODULE_X’
(node::addon_register_func) (regfunc),
^
../src/i2c.cc:295:1: note: in expansion of macro ‘NODE_MODULE’
NODE_MODULE(i2c, Init)
^
../src/i2c.cc:295:18: note: suggested alternative:
NODE_MODULE(i2c, Init)
^
/home/pi/.cache/node-gyp/12.16.1/include/node/node.h:601:36: note: in definition of macro ‘NODE_MODULE_X’
(node::addon_register_func) (regfunc),
^
../src/i2c.cc:295:1: note: in expansion of macro ‘NODE_MODULE’
NODE_MODULE(i2c, Init)
^
/home/pi/.cache/node-gyp/12.16.1/include/node/node.h:217:18: note: ‘node::Init’
NODE_EXTERN void Init(int* argc,
^
i2c.target.mk:109: recipe for target 'Release/obj.target/i2c/src/i2c.o' failed
make: *** [Release/obj.target/i2c/src/i2c.o] Error 1
make: Leaving directory '/home/pi/.node-red/node_modules/i2c/build'
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:311:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Linux 4.19.66-v7+
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/pi/.node-red/node_modules/i2c
gyp ERR! node -v v12.16.1
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! i2c@0.2.3 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the i2c@0.2.3 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/pi/.npm/_logs/2020-03-30T10_25_52_722Z-debug.log

There are known problems with node-red-contrib-i2c, which appears to be no longer maintained and will not build under nodejs 12.x

Can you assist me with the script to uninstall it? Your assistance are appreciated

Uninstall what?
nodejs or the i2c node?
To uninstall the node
npm remove node-red-contrib-i2c
from the .node-red folder

Thanks , but it seems it does not remove it - when I run npm rebuild afterwards it still seems to be there.

npm ERR! Failed at the i2c@0.2.3 install script.

Show us the log from doing the remove again

Also run
npm remove i2c

Have removed both of those now (npm remove i2c and npm remove node-red-contrib-i2c) , please see attach for new error log

errorlog.txt (47.4 KB)

To save us all time let me explain what I did to analyse the latest problem (which was basically the same as I did to analyse the last one).
First look at the end of the install log, there I saw that it was an npm module called ursa that won't build.
I then used my favourite search engine and searched for
npm ursa
and looked for the npmjs hit which took me to https://www.npmjs.com/package/ursa
There I checked that you were using the latest version (0.9.4) which you are.
I then followed the repository link on the right hand side which took me to the modules github page. There I clicked on Issues tab and looking at a few of those it rapidly becomes clear that this node also will not build on nodejs 12 and it seems that the node is no longer maintained.
I don't know which node-red node uses this but you should be able to work that out by searching for all the places ursa appears in .node-red/package-lock.json

This led me to do a bit more googling and found that to determine which nodes depend on ursa you can run
npm ls ursa

Thanks for your help - really appreciate it.

I decided to take a spare SD and download the latest version of OS and then Node-Red.(will dig a bit more on the old SD (OS and Node-red) and see if that can be fixed)

This is also not working at the moment so will need to dig and see what the issues are.

Running Node-RED install for user pi at /home/pi on raspbian

This can take 20-30 minutes on the slower Pi versions - please wait.

Stop Node-RED :heavy_check_mark:
Remove old version of Node-RED :heavy_check_mark:
Remove old version of Node.js :heavy_check_mark:
Install Node.js LTS ✘ Failed to install Node.js - Exit
Clean npm cache
Install Node-RED core
Move global nodes to local
Install extra Pi nodes
Npm rebuild existing nodes
Add shortcut commands
Update systemd script

Any errors will be logged to /var/log/nodered-install.log