memetolsen / node-red-grovepi-nodes Goto Github PK
View Code? Open in Web Editor NEWNode-RED nodes to control GrovePi+ sensors.
Node-RED nodes to control GrovePi+ sensors.
I am trying to get this working on a GrovePi running 2017.10.05-Raspbian_For_Robots_by_Dexter_Industries.zip
This seems to come with node v0.10.29 (unless it got updated somehow) but does not come with npm installed. Installing with sudo apt-get install npm
gives me version 1.4.21
Running npm install node-red-grovepi-nodes
(or with sudo) gives me
pi@dex:~/.node-red $ npm install node-red-grovepi-nodes
> [email protected] install /home/pi/.node-red/node_modules/node-red-grovepi-nodes/node_modules/sleep
> node-gyp rebuild
make: Entering directory '/home/pi/.node-red/node_modules/node-red-grovepi-nodes/node_modules/sleep/build'
CXX(target) Release/obj.target/node_sleep/sleep.o
In file included from ../sleep.cc:2:0:
../node_modules/nan/nan.h:331:47: error: ‘REPLACE_INVALID_UTF8’ is not a member of ‘v8::String’
static const unsigned kReplaceInvalidUtf8 = v8::String::REPLACE_INVALID_UTF8;
^
node_sleep.target.mk:82: recipe for target 'Release/obj.target/node_sleep/sleep.o' failed
make: *** [Release/obj.target/node_sleep/sleep.o] Error 1
make: Leaving directory '/home/pi/.node-red/node_modules/node-red-grovepi-nodes/node_modules/sleep/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/share/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:809:12)
gyp ERR! System Linux 4.4.50-v7+
gyp ERR! command "nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /home/pi/.node-red/node_modules/node-red-grovepi-nodes/node_modules/sleep
gyp ERR! node -v v0.10.29
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian
> [email protected] install /home/pi/.node-red/node_modules/node-red-grovepi-nodes/node_modules/node-grovepi/node_modules/buffertools
> node-gyp rebuild
node.js:815
var cwd = process.cwd();
^
Error: ENOENT, no such file or directory
at Function.startup.resolveArgv0 (node.js:815:23)
at startup (node.js:58:13)
at node.js:906:3
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the sleep package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls sleep
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 4.4.50-v7+
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "node-red-grovepi-nodes"
npm ERR! cwd /home/pi/.node-red
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.21
npm ERR! code ELIFECYCLE
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian
> [email protected] install /home/pi/.node-red/node_modules/node-red-grovepi-nodes/node_modules/i2c-bus
> node-gyp rebuild
Hi,
We setup a simple flow, as depicted in the image below:
It consisted of two inject nodes, with numbers 255 and 0 as payload. They were connected to a LED module on port 7 of the grove shield. When the flow was first deployed, it worked perfectly.
However, when the values were swapped, the LED module showed 'closed' and it cannot be deployed.
On closer look at the node-red process, one would notice that the flow was in 'stopping' state.
The current solution is to do a restart of the node-red process.
WIth node 6.1.10 and npm 3.10.8
npm install node-red-grovepi-nodes fails at
i2c.target.mk:88: recipe for target 'Release/obj.target/i2c/src/i2c.o' failed
make: *** [Release/obj.target/i2c/src/i2c.o] Error 1
make: Leaving directory '/usr/lib/node_modules/node-red/node_modules/i2c-bus/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:276:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Linux 4.4.11-v7+
gyp ERR! command "/usr/bin/nodejs" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/lib/node_modules/node-red/node_modules/i2c-bus
gyp ERR! node -v v6.7.0
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
[email protected] /usr/lib/node_modules/node-red
└── (empty)
npm ERR! Linux 4.4.11-v7+
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "node-red-grovepi-nodes"
npm ERR! node v6.7.0
npm ERR! npm v3.10.3
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
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 i2c-bus package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs i2c-bus
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls i2c-bus
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /usr/lib/node_modules/node-red/npm-debug.log
npm ERR! code 1
pi@raspberrypi:/usr/lib/node_modules/node-red $
Is this a version incompatibility or did I miss something?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.