node-red / node-red/node-red-nodes

node-red-node-pi-mcp3008 - Failed to install

Open
#953 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
1.1k
Forks
612
Avg merge
13h 57m
Merged PRs (30d)
3

Description

Hi,

I tried to install node-red-node-pi-mcp3008, but it failed.

  • run sudo raspi-config and enabled SPI interface -> rebooted
  • changed to ~/.node-red
  • npm install node-red-node-pi-mcp3008 -> got error similar as showed below
  • also tried to install its dependency npm install mcp-spi-adc

Got following error messages:

pi@xxx:~/.node-red $ npm install mcp-spi-adc

> spi-device@3.1.2 install /home/pi/.node-red/node_modules/spi-device
> node-gyp rebuild

make: Verzeichnis „/home/pi/.node-red/node_modules/spi-device/build“ wird betreten
  CXX(target) Release/obj.target/spi/src/spi.o
cc1plus: error: unrecognized argument in option ‘-mfloat-abi=hard’
cc1plus: note: valid arguments to ‘-mfloat-abi=’ are:   softfp
cc1plus: error: unrecognized argument in option ‘-mfpu=vfp’
cc1plus: note: valid arguments to ‘-mfpu=’ are: auto crypto-neon-fp-armv8 fp-armv8 fpv4-sp-d16 fpv5-d16 fpv5-sp-d16 neon-fp-armv8 neon-fp16 neon-vfpv3 neon-vfpv4  vfp3 vfpv2 vfpv3 vfpv3-d16 vfpv3-d16-fp16 vfpv3-fp16 vfpv3xd vfpv3xd-fp16 vfpv4 vfpv4-d16; did you mean ‘vfp3’?
make: *** [spi.target.mk:119: Release/obj.target/spi/src/spi.o] Fehler 1
make: Verzeichnis „/home/pi/.node-red/node_modules/spi-device/build“ wird verlassen
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:400:28)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:285:12)
gyp ERR! System Linux 5.10.103-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/spi-device
gyp ERR! node -v v14.20.1
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! spi-device@3.1.2 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the spi-device@3.1.2 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/2022-09-27T21_09_54_305Z-debug.log

On my Raspberry Pi 3B I have installed:

node-red -v
27 Sep 23:30:02 - [info]

Willkommen bei Node-RED!
===================

27 Sep 23:30:02 - [info] Node-RED Version: v2.0.6
27 Sep 23:30:02 - [info] Node.js  Version: v14.20.1
27 Sep 23:30:02 - [info] Linux 5.10.103-v7+ arm LE

Any suggestions how to solve this issue?
Thanks.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the npm install for node-red-node-pi-mcp3008 or mcp-spi-adc on the reported Raspberry Pi, using the spi-device node-gyp rebuild output as the entry point. Inspect the spi-device install script and compiler configuration; done means the dependency and node-red-node-pi-mcp3008 install successfully on the reported Node.js and Linux setup.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nodejs, raspberry-pi
Domain
build-system, embedded-iot
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.