evancohen / smart-mirror

The fairest of them all. A DIY voice controlled smart mirror with IoT integration.
http://smart-mirror.io
2.79k stars 694 forks source link

issue while installing electron in raspberry pi 4b #894

Closed ghost closed 3 years ago

ghost commented 3 years ago

Expected Behavior

Current Behavior

Possible Solution

Steps to Reproduce (for bugs)

1. 2. 3. 4.

Context

Your Environment

electron@1.7.6 postinstall /usr/lib/node_modules/electron node install.js

/usr/lib/node_modules/electron/install.js:48 throw err ^

Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/electron/.electron' npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! electron@1.7.6 postinstall: node install.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the electron@1.7.6 postinstall script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2021-01-20T07_33_49_148Z-debug.log

sdetweil commented 3 years ago

never use sudo

sdetweil commented 3 years ago

to fix

chown -r pi ~/.npm

ghost commented 3 years ago

thanks for your response

ghost commented 3 years ago

but that didn't work MASSAGE:- pi@raspberrypi:~ $ chown -r pi ~/.npm chown: invalid option -- 'r' Try 'chown --help' for more information.

ghost commented 3 years ago

and after i capitalized R and trying to install with npm i got this massage ``pi@raspberrypi:~ $ chown -R pi ~/.npm pi@raspberrypi:~ $ npm install electron -g npm WARN checkPermissions Missing write access to /usr/lib/node_modules npm ERR! code EACCES npm ERR! syscall access npm ERR! path /usr/lib/node_modules npm ERR! errno -13 npm ERR! Error: EACCES: permission denied, access '/usr/lib/node_modules' npm ERR! { [Error: EACCES: permission denied, access '/usr/lib/node_modules'] npm ERR! stack: npm ERR! 'Error: EACCES: permission denied, access \'/usr/lib/node_modules\'', npm ERR! errno: -13, npm ERR! code: 'EACCES', npm ERR! syscall: 'access', npm ERR! path: '/usr/lib/node_modules' } npm ERR! npm ERR! The operation was rejected by your operating system. npm ERR! It is likely you do not have the permissions to access this file as the current user npm ERR! npm ERR! If you believe this might be a permissions issue, please double-check the npm ERR! permissions of the file and its containing directories, or try running npm ERR! the command again as root/Administrator.

npm ERR! A complete log of this run can be found in: npm ERR! /home/pi/.npm/_logs/2021-01-21T07_46_04_272Z-debug.log

sdetweil commented 3 years ago

sorry, in hospital w covid. csnt help more now

ghost commented 3 years ago

thanks for you help i install npm using terminal and i success fully install electron

ghost commented 3 years ago

i wish you get well soon