*Solved* Fail to install node-red-contrib on Ubuntu

I run into this error trying to install the node-red TTN node.
Im using DigitalOcean and i have followed this tutorial:

npm install node-red-contrib-ttn

grpc@1.13.1 install /root/node_modules/grpc
node-pre-gyp install --fallback-to-build --library=static_library

node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp ERR! UNCAUGHT EXCEPTION
node-pre-gyp ERR! stack TypeError: this is not a typed array.
node-pre-gyp ERR! stack at Function.from (native)
node-pre-gyp ERR! stack at Object. (/root/node_modules/grpc/node_ modules/tar/lib/parse.js:33:27)
node-pre-gyp ERR! stack at Module._compile (module.js:410:26)
node-pre-gyp ERR! stack at Object.Module._extensions…js (module.js:417:10)
node-pre-gyp ERR! stack at Module.load (module.js:344:32)
node-pre-gyp ERR! stack at Function.Module.load (module.js:301:12)
node-pre-gyp ERR! stack at Module.require (module.js:354:17)
node-pre-gyp ERR! stack at require (internal/module.js:12:17)
node-pre-gyp ERR! stack at Object. (/root/node_modules/grpc/node
modules/tar/lib/list.js:10:16)
node-pre-gyp ERR! stack at Module._compile (module.js:410:26)
node-pre-gyp ERR! System Linux 4.4.0-131-generic
node-pre-gyp ERR! command β€œ/usr/bin/nodejs” β€œ/root/node_modules/grpc/node_module s/.bin/node-pre-gyp” β€œinstall” β€œβ€“fallback-to-build” β€œβ€“library=static_library”
node-pre-gyp ERR! cwd /root/node_modules/grpc
node-pre-gyp ERR! node -v v4.2.6
node-pre-gyp ERR! node-pre-gyp -v v0.10.3
node-pre-gyp ERR! This is a bug in node-pre-gyp.
node-pre-gyp ERR! Try to update node-pre-gyp and file an issue if it does not he lp:
node-pre-gyp ERR! https://github.com/mapbox/node-pre-gyp/issues

  • isarray@0.0.1 node_modules/mqtt-connection/node_modules/isarray
  • mqtt-packet@3.5.0 node_modules/mqtt-connection/node_modules/mqtt-packet
  • string_decoder@0.10.31 node_modules/mqtt-connection/node_modules/string_decode r
  • readable-stream@1.0.34 node_modules/mqtt-connection/node_modules/readable-stre am
  • through2@0.6.5 node_modules/mqtt-connection/node_modules/through2
  • isarray@0.0.1 node_modules/reduplexer/node_modules/isarray
  • string_decoder@0.10.31 node_modules/reduplexer/node_modules/string_decoder
  • readable-stream@1.0.34 node_modules/reduplexer/node_modules/readable-stream
  • reduplexer@1.1.0 node_modules/reduplexer
  • isarray@0.0.1 node_modules/ttn/node_modules/isarray
  • mqtt-packet@3.5.0 node_modules/ttn/node_modules/mqtt-packet
  • pump@1.0.3 node_modules/ttn/node_modules/pump
  • string_decoder@0.10.31 node_modules/ttn/node_modules/string_decoder
  • readable-stream@1.0.34 node_modules/ttn/node_modules/readable-stream
  • ultron@1.0.2 node_modules/ttn/node_modules/ultron
  • ws@1.1.5 node_modules/ttn/node_modules/ws
  • websocket-stream@3.3.3 node_modules/ttn/node_modules/websocket-stream
  • mqtt@1.14.1 node_modules/ttn/node_modules/mqtt
  • mqtt-connection@2.1.1 node_modules/mqtt-connection
  • options@0.0.6 node_modules/options
    /root
    β”œβ”€β”¬ debug@2.6.9
    β”‚ └── ms@2.0.0
    β”œβ”€β”¬ jsonwebtoken@7.4.3
    β”‚ └─┬ jws@3.1.5
    β”‚ └── safe-buffer@5.1.2
    β”œβ”€β”¬ mqtt@2.18.3
    β”‚ β”œβ”€β”¬ end-of-stream@1.4.1
    β”‚ β”‚ └─┬ once@1.4.0
    β”‚ β”‚ └── wrappy@1.0.2
    β”‚ β”œβ”€β”¬ help-me@1.1.0
    β”‚ β”‚ └─┬ glob-stream@6.1.0
    β”‚ β”‚ └─┬ glob@7.1.2
    β”‚ β”‚ β”œβ”€β”€ fs.realpath@1.0.0
    β”‚ β”‚ β”œβ”€β”€ inflight@1.0.6
    β”‚ β”‚ β”œβ”€β”¬ minimatch@3.0.4
    β”‚ β”‚ β”‚ └─┬ brace-expansion@1.1.11
    β”‚ β”‚ β”‚ β”œβ”€β”€ balanced-match@1.0.0
    β”‚ β”‚ β”‚ └── concat-map@0.0.1
    β”‚ β”‚ └── path-is-absolute@1.0.1
    β”‚ β”œβ”€β”€ inherits@2.0.3
    β”‚ β”œβ”€β”€ minimist@1.2.0
    β”‚ β”œβ”€β”¬ mqtt-packet@5.6.0
    β”‚ β”‚ └── process-nextick-args@2.0.0
    β”‚ └─┬ readable-stream@2.3.6
    β”‚ β”œβ”€β”€ core-util-is@1.0.2
    β”‚ β”œβ”€β”€ isarray@1.0.0
    β”‚ β”œβ”€β”€ string_decoder@1.1.1
    β”‚ └── util-deprecate@1.0.2
    └─┬ node-fetch@1.7.3
    └─┬ encoding@0.1.12
    └─┬ iconv-lite@0.4.23
    └── safer-buffer@2.1.2

npm WARN enoent ENOENT: no such file or directory, open β€˜/root/package.json’
npm WARN root No description
npm WARN root No repository field.
npm WARN root No README data
npm WARN root No license field.
npm ERR! Linux 4.4.0-131-generic
npm ERR! argv β€œ/usr/bin/nodejs” β€œ/usr/bin/npm” β€œinstall” β€œnode-red-contrib-ttn”
npm ERR! node v4.2.6
npm ERR! npm v3.5.2
npm ERR! code ELIFECYCLE

npm ERR! grpc@1.13.1 install: node-pre-gyp install --fallback-to-build --librar y=static_library
npm ERR! Exit status 7
npm ERR!
npm ERR! Failed at the grpc@1.13.1 install script β€˜node-pre-gyp install --fallba ck-to-build --library=static_library’.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the grpc package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-pre-gyp install --fallback-to-build --library=static_library
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs grpc
npm ERR! Or if that isn’t available, you can get their info via:
npm ERR! npm owner ls grpc
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /root/npm-debug.log

Needed to update nodejs… :slight_smile:

2 Likes