Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RASPBERRY PI- sudo npm install node-red-contrib-gpio -g #8

Open
rprasanth opened this issue Feb 17, 2016 · 5 comments
Open

RASPBERRY PI- sudo npm install node-red-contrib-gpio -g #8

rprasanth opened this issue Feb 17, 2016 · 5 comments

Comments

@rprasanth
Copy link

when i try to install in my raspberry pi its is throwing these errors, how could i resolve this issue, reply me plz
sudo npm install node-red-contrib-gpio -g
npm WARN locking Error: EEXIST, open '/root/.npm/_locks/node-red-contrib-gpio-05c620f26fa23ec7.lock'
npm WARN locking at Error (native)
npm WARN locking /root/.npm/_locks/node-red-contrib-gpio-05c620f26fa23ec7.lock failed { [Error: EEXIST, open '/root/.npm/_locks/node-red-contrib-gpio-05c620f26fa23ec7.lock']
npm WARN locking errno: -17,
npm WARN locking code: 'EEXIST',
npm WARN locking path: '/root/.npm/_locks/node-red-contrib-gpio-05c620f26fa23ec7.lock' }
npm ERR! Linux 4.1.17-v7+
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "node-red-contrib-gpio" "-g"
npm ERR! node v0.12.10
npm ERR! npm v2.14.9

npm ERR! Attempt to unlock /usr/lib/node_modules/node-red-contrib-gpio, which hasn't been locked
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! https://github.com/npm/npm/issues

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

@monteslu
Copy link
Owner

you shouldn't need to install this with sudo
Can you try just going into your ~/.node-red folder and doing a normal npm i node-red-contrib-gpio

@monteslu
Copy link
Owner

@rprasanth
Copy link
Author

its getting build in the home directory under node_modules, but the nodes are not visible in browser, please help to find the issue to solve!!! does i have to change the path of the node, if it is so, how can i do that??
i did the same procedure in the desktop Ubuntu, it got installed and its showing every nodes, but in pi i am not getting, please help

screenshot from 2016-02-18 12-22-15

@rprasanth rprasanth reopened this Feb 18, 2016
@gotititu
Copy link

gotititu commented Apr 9, 2016

@rprasanth
You might have solved the issue by now.

After numerous attempts on my Rpi 3, I finally got the right recipe. The below is for raspbain version code name jessie march 2016 release kernel 4.1

Step 1) Uninstall everything as mentioned in manual section http://nodered.org/docs/hardware/raspberrypi. I went ahead and removed ~/.node-red directory from root and made sure npm remove all the nodes from /usr/lib/node_modules. If not then you will have to use --force to clear cache while installing it again.

Step 2) Follow the same guide and install nodejs 4.4.2 and npm

Step 3) Now the tricky part, in documentation it is mentioned to install extra nodes such as node-red-contrib-gpio in ~/.node-red, but that didn't work for me, so I went ahead and installed
under root (use force if your /usr/lib/node_modules is not empty)
sudo npm install -g johny-five --unsafe-perm --force
sudo npm install -g raspi-io --unsafe-perm --force
sudo npm install -g node-red-contrib-gpio --unsafe-perm --force

everything should work fine, it did work for me.

@TTVert
Copy link

TTVert commented Jan 5, 2017

Hate to bring this back up but has anyone found a better solution to this? The only way I can get raspi-io to run is if I run node-red as admin and I'd rather not have to do this. If I run node-red as a regular user I will get app bootloops w/ the error below. I'm on Raspian Jessie kernel 4.4.38-v7+

pi Node-RED[23314]: wiringPiSetup: Must be root. (Did you forget sudo?)
pi systemd[1]: nodered.service: main process exited, code=killed, status=6/ABRT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants