Installing from Github on Pi

I tried to install Node-RED from Github but I’m failing at second step

pi@s18apr18:~/node-red $ npm install
npm WARN deprecated bcrypt@1.0.3: bcrypt < v2.0.0 is susceptible to bcrypt wrap-around bug. Upgrade to bcrypt >= v2.0.0 for improved support for newer bcrypt hashes
npm WARN deprecated formatio@1.1.1: This package is unmaintained. Use @sinonjs/formatio instead
npm WARN deprecated i18next-client@1.10.3: you can use npm install i18next from version 2.0.0
npm WARN deprecated nodemailer@1.11.0: All versions below 4.0.1 of Nodemailer are deprecated. See https://nodemailer.com/status/
npm WARN deprecated mailparser@0.6.2: This project is unmaintained
npm WARN deprecated nomnom@1.8.1: Package no longer supported. Contact support@npmjs.com for more info.
npm WARN deprecated mailcomposer@2.1.0: This project is unmaintained
npm WARN deprecated mimelib@0.3.1: This project is unmaintained
npm WARN deprecated buildmail@2.0.0: This project is unmaintained

> fibers@2.0.2 install /home/pi/node-red/node_modules/fibers
> node build.js || nodejs build.js

make: Entering directory '/home/pi/node-red/node_modules/fibers/build'
  CXX(target) Release/obj.target/fibers/src/fibers.o
  CXX(target) Release/obj.target/fibers/src/coroutine.o
  CC(target) Release/obj.target/fibers/src/libcoro/coro.o
  SOLINK_MODULE(target) Release/obj.target/fibers.node
  COPY Release/fibers.node
make: Leaving directory '/home/pi/node-red/node_modules/fibers/build'
Installed in `/home/pi/node-red/node_modules/fibers/bin/linux-arm-57/fibers.node`

> iltorb@1.3.10 install /home/pi/node-red/node_modules/iltorb
> detect-libc prebuild-install || node-gyp rebuild

prebuild-install WARN install No prebuilt binaries found (target=8.11.1 runtime=node arch=arm platform=linux)
make: Entering directory '/home/pi/node-red/node_modules/iltorb/build'
  CC(target) Release/obj.target/iltorb/brotli/common/dictionary.o
  CC(target) Release/obj.target/iltorb/brotli/dec/bit_reader.o
  CC(target) Release/obj.target/iltorb/brotli/dec/decode.o

 CC(target) Release/obj.target/iltorb/brotli/dec/huffman.o
  CC(target) Release/obj.target/iltorb/brotli/dec/state.o
  CC(target) Release/obj.target/iltorb/brotli/enc/backward_references.o
  CC(target) Release/obj.target/iltorb/brotli/enc/backward_references_hq.o
  CC(target) Release/obj.target/iltorb/brotli/enc/bit_cost.o
  CC(target) Release/obj.target/iltorb/brotli/enc/block_splitter.o
  CC(target) Release/obj.target/iltorb/brotli/enc/brotli_bit_stream.o
  CC(target) Release/obj.target/iltorb/brotli/enc/cluster.o
  CC(target) Release/obj.target/iltorb/brotli/enc/compress_fragment.o
  CC(target) Release/obj.target/iltorb/brotli/enc/compress_fragment_two_pass.o
  CC(target) Release/obj.target/iltorb/brotli/enc/dictionary_hash.o
  CC(target) Release/obj.target/iltorb/brotli/enc/encode.o
  CC(target) Release/obj.target/iltorb/brotli/enc/entropy_encode.o
  CC(target) Release/obj.target/iltorb/brotli/enc/histogram.o
  CC(target) Release/obj.target/iltorb/brotli/enc/literal_cost.o
  CC(target) Release/obj.target/iltorb/brotli/enc/memory.o
  CC(target) Release/obj.target/iltorb/brotli/enc/metablock.o
  CC(target) Release/obj.target/iltorb/brotli/enc/static_dict.o
  CC(target) Release/obj.target/iltorb/brotli/enc/utf8_util.o
  CXX(target) Release/obj.target/iltorb/src/common/allocator.o
  CXX(target) Release/obj.target/iltorb/src/common/stream_coder.o
  CXX(target) Release/obj.target/iltorb/src/dec/stream_decode.o
  CXX(target) Release/obj.target/iltorb/src/dec/stream_decode_worker.o
  CXX(target) Release/obj.target/iltorb/src/enc/stream_encode.o
  CXX(target) Release/obj.target/iltorb/src/enc/stream_encode_worker.o
  CXX(target) Release/obj.target/iltorb/src/iltorb.o
  SOLINK_MODULE(target) Release/obj.target/iltorb.node
  COPY Release/iltorb.node
  COPY ../build/bindings/iltorb.node
  TOUCH Release/obj.target/action_after_build.stamp
make: Leaving directory '/home/pi/node-red/node_modules/iltorb/build'

> node-sass@4.9.0 install /home/pi/node-red/node_modules/node-sass
> node scripts/install.js

Downloading binary from https://github.com/sass/node-sass/releases/download/v4.9.0/linux-arm-57_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v4.9.0/linux-arm-57_binding.node": 

HTTP error 404 Not Found

Hint: If github.com is not accessible in your location
      try setting a proxy via HTTP_PROXY, e.g. 

      export HTTP_PROXY=http://example.com:1234

or configure npm proxy via

      npm config set proxy http://example.com:8080

> bcrypt@1.0.3 install /home/pi/node-red/node_modules/bcrypt
> node-pre-gyp install --fallback-to-build

node-pre-gyp ERR! Tried to download(404): https://github.com/kelektiv/node.bcrypt.js/releases/download/v1.0.3/bcrypt_lib-v1.0.3-node-v57-linux-arm.tar.gz 
node-pre-gyp ERR! Pre-built binaries not found for bcrypt@1.0.3 and node@8.11.1 (node-v57 ABI) (falling back to source compile with node-gyp) 
make: Entering directory '/home/pi/node-red/node_modules/bcrypt/build'
  CXX(target) Release/obj.target/bcrypt_lib/src/blowfish.o
  CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt.o
  CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt_node.o
  SOLINK_MODULE(target) Release/obj.target/bcrypt_lib.node
  COPY Release/bcrypt_lib.node
  COPY /home/pi/node-red/node_modules/bcrypt/lib/binding/bcrypt_lib.node
  TOUCH Release/obj.target/action_after_build.stamp
make: Leaving directory '/home/pi/node-red/node_modules/bcrypt/build'

> chromedriver@2.40.0 install /home/pi/node-red/node_modules/chromedriver
> node install.js

Only Linux 64 bits supported.
npm WARN node-red-node-test-helper@0.1.8 requires a peer of node-red@~0.18.4 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! chromedriver@2.40.0 install: `node install.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the chromedriver@2.40.0 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/2018-06-13T06_51_19_406Z-debug.log

Help please!
Simon

Hi,

this is a known issue: https://github.com/node-red/node-red/issues/1629

Quick fix is to edit package.json and remove chromedriver from the devDependencies section.

Nick

1 Like

Ta for info - did the modification

I’m now getting this

pi@s18apr18:~/node-red $ npm install
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN node-red-node-test-helper@0.1.8 requires a peer of node-red@~0.18.4 but none is installed. You must install peer dependencies yourself.
npm WARN wdio-chromedriver-service@0.1.3 requires a peer of chromedriver@^2.31.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})

up to date in 41.481s
pi@s18apr18:~/node-red $ npm run build

> node-red@0.18.7 build /home/pi/node-red
> grunt build

Loading "sass.js" tasks...ERROR
>> Error: Node Sass does not yet support your current environment: Linux Unsupported architecture (arm) with Node.js 8.x
>> For more information on which environments are supported please see:
>> https://github.com/sass/node-sass/releases/tag/v4.9.0
Warning: Task "sass:build" not found. Use --force to continue.

Aborted due to warnings.
npm ERR! code ELIFECYCLE
npm ERR! errno 3
npm ERR! node-red@0.18.7 build: `grunt build`
npm ERR! Exit status 3
npm ERR! 
npm ERR! Failed at the node-red@0.18.7 build 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/2018-06-13T07_57_23_446Z-debug.log

JFI I’ve just installed it on my Win10 machine so that is good enough for me to just play with source code - so I don’t actually need to install from source on my Pi anymore

I tried this some months ago and you have to compile node-sass from source, which takes hours on the pi....
See also

yeah - running full dev mode on a Pi is not for the time-pressured