pradeepmouli / homebridge-isy-js

Homebridge platform plugin for the ISY series of home controllers from Universal Devices.
MIT License
28 stars 9 forks source link

Multiple errors installing homebridge-isy@0.5.0-beta.26 #12

Closed dxdc closed 4 years ago

dxdc commented 4 years ago
$ sudo npm -g install homebridge-isy@0.5.0-beta.26
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated fsevents@1.2.12: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated

> homebridge-isy@0.5.0-beta.26 postinstall /usr/lib/node_modules/homebridge-isy
> npm run moduleRedirect; npm run cleanup

npm ERR! code EACCES
npm ERR! syscall scandir
npm ERR! path /root/.npm/_logs
npm ERR! errno -13
npm ERR! 
npm ERR! Your cache folder contains root-owned files, due to a bug in
npm ERR! previous versions of npm which has since been addressed.
npm ERR! 
npm ERR! To permanently fix this problem, please run:
npm ERR!   sudo chown -R 65534:1000 "/root/.npm"
glob error { [Error: EACCES: permission denied, scandir '/root/.npm/_logs']
  errno: -13,
  code: 'EACCES',
  syscall: 'scandir',
  path: '/root/.npm/_logs' }

> homebridge-isy@0.5.0-beta.26 moduleRedirect /usr/lib/node_modules/homebridge-isy
> babel tmp -d dist

Reference to module hap-nodejs in /usr/lib/node_modules/homebridge-isy/tmp/ISYAccessory.js mapped to: /usr/lib/node_modules/homebridge/node_modules/hap-nodejs/dist/index.js
Reference to module hap-nodejs/dist/lib/util/uuid in /usr/lib/node_modules/homebridge-isy/tmp/ISYAccessory.js mapped to: /usr/lib/node_modules/homebridge/node_modules/hap-nodejs/dist/lib/util/uuid.js
Reference to module homebridge/lib/logger in /usr/lib/node_modules/homebridge-isy/tmp/ISYAccessory.js mapped to: /usr/lib/node_modules/homebridge/lib/logger.js
Reference to module homebridge/lib/platformAccessory in /usr/lib/node_modules/homebridge-isy/tmp/ISYAccessory.js mapped to: /usr/lib/node_modules/homebridge/lib/platformAccessory.js
{ Error: EACCES: permission denied, open 'dist/ISYAccessory.js'
    at Object.openSync (fs.js:443:3)
    at Object.writeFileSync (fs.js:1194:35)
    at outputFileSync (/usr/lib/node_modules/homebridge-isy/node_modules/@babel/cli/lib/babel/dir.js:80:17)
    at /usr/lib/node_modules/homebridge-isy/node_modules/@babel/cli/lib/babel/dir.js:122:11
    at Generator.next (<anonymous>)
    at asyncGeneratorStep (/usr/lib/node_modules/homebridge-isy/node_modules/@babel/cli/lib/babel/dir.js:66:103)
    at _next (/usr/lib/node_modules/homebridge-isy/node_modules/@babel/cli/lib/babel/dir.js:68:194)
    at process._tickCallback (internal/process/next_tick.js:68:7)
  errno: -13,
  syscall: 'open',
  code: 'EACCES',
  path: 'dist/ISYAccessory.js' }
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! homebridge-isy@0.5.0-beta.26 moduleRedirect: `babel tmp -d dist`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the homebridge-isy@0.5.0-beta.26 moduleRedirect script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! code EACCES
npm ERR! syscall scandir
npm ERR! path /root/.npm/_logs
npm ERR! errno -13
npm ERR! 
npm ERR! Your cache folder contains root-owned files, due to a bug in
npm ERR! previous versions of npm which has since been addressed.
npm ERR! 
npm ERR! To permanently fix this problem, please run:
npm ERR!   sudo chown -R 65534:1000 "/root/.npm"
glob error { [Error: EACCES: permission denied, scandir '/root/.npm/_logs']
  errno: -13,
  code: 'EACCES',
  syscall: 'scandir',
  path: '/root/.npm/_logs' }

> homebridge-isy@0.5.0-beta.26 cleanup /usr/lib/node_modules/homebridge-isy
> rm -r tmp

rm: descend into write-protected directory 'tmp'? ^Cnpm ERR! Callback called more than once.
dxdc commented 4 years ago

(FYI... running sudo chown -R 65534:1000 "/root/.npm" had no effect)

pradeepmouli commented 4 years ago

Try installing with the —unsafe-perm flag.

Sent from my iPhone

On Apr 30, 2020, at 8:01 PM, dxdc notifications@github.com wrote:

 (FYI... running sudo chown -R 65534:1000 "/root/.npm" had no effect)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

dxdc commented 4 years ago

@pradeepmouli I can confirm this works:

sudo npm install --unsafe-perm=true -g homebridge-isy