hybridgroup / cylon-beaglebone

Cylon adaptor for the Beaglebone Black single board computer
http://cylonjs.com
Other
20 stars 7 forks source link

EACCES: permission denied, mkdir '/root/.npm/i2c/0.2.3/package' #35

Open hadrien-toma opened 7 years ago

hadrien-toma commented 7 years ago

Hello,

I am trying to use Cylon on my BBB with this context :

I resized my SD card partition as explained here.

Next, I ran : sudo su npm install cylon cylon-beaglebone

And it unfortunately gives me :


cylon-beaglebone@0.17.0 install /home/debian/node_modules/cylon-beaglebone ./scripts/install-i2c.sh

Installing i2c module for node v6.3.1 npm ERR! Linux 4.4.9-ti-r25 npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "i2c" npm ERR! node v6.3.1 npm ERR! npm v3.10.3 npm ERR! path /root/.npm/i2c/0.2.3/package npm ERR! code EACCES npm ERR! errno -13 npm ERR! syscall mkdir

npm ERR! Error: EACCES: permission denied, mkdir '/root/.npm/i2c/0.2.3/package' npm ERR! at Error (native) npm ERR! { Error: EACCES: permission denied, mkdir '/root/.npm/i2c/0.2.3/package' npm ERR! at Error (native) npm ERR! errno: -13, npm ERR! code: 'EACCES', npm ERR! syscall: 'mkdir', npm ERR! path: '/root/.npm/i2c/0.2.3/package', npm ERR! parent: 'cylon-beaglebone' } npm ERR! npm ERR! Please try running this command again as root/Administrator.

npm ERR! Please include the following file with any support request: npm ERR! /home/debian/node_modules/cylon-beaglebone/npm-debug.log /home/debian �└��─��─ cylon@1.3.0

npm WARN enoent ENOENT: no such file or directory, open '/home/debian/package.json' npm WARN debian No description npm WARN debian No repository field. npm WARN debian No README data npm WARN debian No license field. npm ERR! Linux 4.4.9-ti-r25 npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "cylon" "cylon-beaglebone" npm ERR! node v6.3.1 npm ERR! npm v3.10.3 npm ERR! code ELIFECYCLE

npm ERR! cylon-beaglebone@0.17.0 install: ./scripts/install-i2c.sh npm ERR! Exit status 243 npm ERR! npm ERR! Failed at the cylon-beaglebone@0.17.0 install script './scripts/install-i2c.sh'. 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 cylon-beaglebone package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! ./scripts/install-i2c.sh npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs cylon-beaglebone npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls cylon-beaglebone npm ERR! There is likely additional logging output above.

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


Moreover, /home/debian/node_modules/cylon-beaglebone/npm-debug.log doesn't exist.

Do you have an idea of what I have to do?

mhelmetag commented 7 years ago

I'm not sure you're supposed to be installing with sudo. I just created a new folder, npm init'd and then npm install --save cylon cylon-beaglebone. I was able to get LEDs to work but I'm having trouble with servos.