WebReflection / benja

Bootable Electron Node JS Application
https://archibold.io/benja/
194 stars 32 forks source link

Permission Issue #28

Closed facetime88 closed 7 years ago

facetime88 commented 7 years ago

I just tried to install Cylon and it shows me some errors as follow:

[benja@benja app]$ npm install cylon-firmata cylon-gpio cylon-i2c npm WARN vms@1.0.0 No repository field. npm WARN The package electron is included as both a dev and production dependency. npm ERR! path ../mkdirp/bin/cmd.js npm ERR! code EPERM npm ERR! errno -1 npm ERR! syscall symlink npm ERR! Error: EPERM: operation not permitted, symlink '../mkdirp/bin/cmd.js' -> '/home/benja/app/node_modules/firmata/node_modules/serialport/node_modules/node-pre-gyp/node_modules/.bin/mkdirp' npm ERR! { Error: EPERM: operation not permitted, symlink '../mkdirp/bin/cmd.js' -> '/home/benja/app/node_modules/firmata/node_modules/serialport/node_modules/node-pre-gyp/node_modules/.bin/mkdirp' npm ERR! cause: npm ERR! { Error: EPERM: operation not permitted, symlink '../mkdirp/bin/cmd.js' -> '/home/benja/app/node_modules/firmata/node_modules/serialport/node_modules/node-pre-gyp/node_modules/.bin/mkdirp' npm ERR! errno: -1, npm ERR! code: 'EPERM', npm ERR! syscall: 'symlink', npm ERR! path: '../mkdirp/bin/cmd.js', npm ERR! dest: '/home/benja/app/node_modules/firmata/node_modules/serialport/node_modules/node-pre-gyp/node_modules/.bin/mkdirp' }, npm ERR! stack: 'Error: EPERM: operation not permitted, symlink \'../mkdirp/bin/cmd.js\' -> \'/home/benja/app/node_modules/firmata/node_modules/serialport/node_modules/node-pre-gyp/node_modules/.bin/mkdirp\'', npm ERR! errno: -1, npm ERR! code: 'EPERM', npm ERR! syscall: 'symlink', npm ERR! path: '../mkdirp/bin/cmd.js', npm ERR! dest: '/home/benja/app/node_modules/firmata/node_modules/serialport/node_modules/node-pre-gyp/node_modules/.bin/mkdirp', npm ERR! parent: 'node-pre-gyp' } npm ERR! npm ERR! Please try running this command again as root/Administrator. npm ERR! A complete log of this run can be found in: npm ERR! /home/benja/.npm/_logs/2017-08-09T08_35_00_300Z-debug.log

How to fix this? Many thanks.

WebReflection commented 7 years ago

npm install -g cylon-firmata cylon-gpio cylon-i2c

WebReflection commented 7 years ago

since you are on Electron version, you might want to follow these instructions, skipping the Install PIGPIO and copy it's lib file to the user folder part: https://github.com/WebReflection/benja/issues/22#issuecomment-319609051

WebReflection commented 7 years ago

it's actually better this second way, if you install -g Electron might not be able to find those modules.

Try both