cylon-beaglebone icon indicating copy to clipboard operation
cylon-beaglebone copied to clipboard

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

Open hadrien-toma opened this issue 8 years ago • 1 comments

Hello,

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

  • uname -a gives me : Linux beaglebone 4.4.9-ti-r25 #1 SMP Thu May 5 23:08:13 UTC 2016 armv7l GNU/Linux
  • cat /etc/debian_version gives me : 8.5
  • npm --version gives me : 3.10.3
  • node --version gives me : v6.3.1

I resized my SD card partition as explained here.

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

And it unfortunately gives me :


[email protected] 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 �└��─��─ [email protected]

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! [email protected] install: ./scripts/install-i2c.sh npm ERR! Exit status 243 npm ERR! npm ERR! Failed at the [email protected] 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?

hadrien-toma avatar Aug 16 '16 15:08 hadrien-toma

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.

mhelmetag avatar Sep 27 '16 07:09 mhelmetag