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

Does not install properly on RPi #3

Closed dxdc closed 4 years ago

dxdc commented 4 years ago

This branch does not install properly on RaspberryPi.

  1. typescript is missing from devDependencies, and will cause the tsc command to fail if user does not have typescript installed globally.

  2. Once typescript is installed globally, the following errors appear. Not sure if it's related, but running node 10 on the RPi.

There are no issues with installing this on macOS. I'm not sure if it's a problem with npm, node, git, or something else.

npm ERR! prepareGitDep 1> 
npm ERR! prepareGitDep > isy-js@0.5.0 prepare /home/pi/.npm/_cacache/tmp/git-clone-4418af54
npm ERR! prepareGitDep > tsc
npm ERR! prepareGitDep 
npm ERR! prepareGitDep src/elkdevice.ts(1,27): error TS2307: Cannot find module './ISYDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(12,8): error TS2339: Property 'area' does not exist on type 'ELKAlarmPanelDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(13,8): error TS2339: Property 'alarmTripState' does not exist on type 'ELKAlarmPanelDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(13,30): error TS2339: Property 'ALARM_TRIP_STATE_DISARMED' does not exist on type 'ELKAlarmPanelDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(14,8): error TS2339: Property 'alarmState' does not exist on type 'ELKAlarmPanelDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(14,26): error TS2339: Property 'ALARM_STATE_NOT_READY_TO_ARM' does not exist on type 'ELKAlarmPanelDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(15,8): error TS2339: Property 'alarmMode' does not exist on type 'ELKAlarmPanelDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(15,25): error TS2339: Property 'ALARM_MODE_DISARMED' does not exist on type 'ELKAlarmPanelDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(18,8): error TS2339: Property 'deviceFriendlyName' does not exist on type 'ELKAlarmPanelDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(19,8): error TS2339: Property 'deviceType' does not exist on type 'ELKAlarmPanelDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(20,8): error TS2339: Property 'connectionType' does not exist on type 'ELKAlarmPanelDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(21,8): error TS2339: Property 'batteryOperated' does not exist on type 'ELKAlarmPanelDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(22,8): error TS2339: Property 'voltage' does not exist on type 'ELKAlarmPanelDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(23,8): error TS2339: Property 'lastChanged' does not exist on type 'ELKAlarmPanelDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(27,16): error TS2339: Property 'isy' does not exist on type 'ELKAlarmPanelDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(27,54): error TS2339: Property 'area' does not exist on type 'ELKAlarmPanelDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(30,16): error TS2339: Property 'isy' does not exist on type 'ELKAlarmPanelDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(30,54): error TS2339: Property 'area' does not exist on type 'ELKAlarmPanelDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(34,15): error TS2339: Property 'isy' does not exist on type 'ELKAlarmPanelDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(34,53): error TS2339: Property 'area' does not exist on type 'ELKAlarmPanelDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(37,24): error TS2339: Property 'alarmMode' does not exist on type 'ELKAlarmPanelDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(37,52): error TS2339: Property 'alarmState' does not exist on type 'ELKAlarmPanelDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(37,82): error TS2339: Property 'alarmTripState' does not exist on type 'ELKAlarmPanelDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(40,15): error TS2339: Property 'alarmTripState' does not exist on type 'ELKAlarmPanelDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(43,15): error TS2339: Property 'alarmState' does not exist on type 'ELKAlarmPanelDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(46,15): error TS2339: Property 'alarmMode' does not exist on type 'ELKAlarmPanelDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(53,22): error TS2339: Property 'area' does not exist on type 'ELKAlarmPanelDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(55,14): error TS2339: Property 'alarmTripState' does not exist on type 'ELKAlarmPanelDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(56,11): error TS2339: Property 'alarmTripState' does not exist on type 'ELKAlarmPanelDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(61,14): error TS2339: Property 'alarmState' does not exist on type 'ELKAlarmPanelDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(62,11): error TS2339: Property 'alarmState' does not exist on type 'ELKAlarmPanelDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(67,14): error TS2339: Property 'alarmMode' does not exist on type 'ELKAlarmPanelDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(68,11): error TS2339: Property 'alarmMode' does not exist on type 'ELKAlarmPanelDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(74,9): error TS2339: Property 'lastChanged' does not exist on type 'ELKAlarmPanelDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(81,31): error TS2339: Property 'ALARM_MODE_DISARMED' does not exist on type 'ELKAlarmPanelDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(82,31): error TS2339: Property 'ALARM_MODE_AWAY' does not exist on type 'ELKAlarmPanelDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(83,31): error TS2339: Property 'ALARM_MODE_STAY' does not exist on type 'ELKAlarmPanelDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(84,31): error TS2339: Property 'ALARM_MODE_STAY_INSTANT' does not exist on type 'ELKAlarmPanelDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(85,31): error TS2339: Property 'ALARM_MODE_NIGHT' does not exist on type 'ELKAlarmPanelDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(86,31): error TS2339: Property 'ALARM_MODE_NIGHT_INSTANT' does not exist on type 'ELKAlarmPanelDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(87,31): error TS2339: Property 'ALARM_MODE_VACATION' does not exist on type 'ELKAlarmPanelDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(90,31): error TS2339: Property 'ALARM_TRIP_STATE_DISARMED' does not exist on type 'ELKAlarmPanelDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(91,31): error TS2339: Property 'ALARM_TRIP_STATE_EXIT_DELAY' does not exist on type 'ELKAlarmPanelDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(92,31): error TS2339: Property 'ALARM_TRIP_STATE_TRIPPED' does not exist on type 'ELKAlarmPanelDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(95,31): error TS2339: Property 'ALARM_STATE_NOT_READY_TO_ARM' does not exist on type 'ELKAlarmPanelDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(96,31): error TS2339: Property 'ALARM_STATE_READY_TO_ARM' does not exist on type 'ELKAlarmPanelDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(97,31): error TS2339: Property 'ALARM_STATE_READY_TO_ARM_VIOLATION' does not exist on type 'ELKAlarmPanelDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(98,31): error TS2339: Property 'ALARM_STATE_ARMED_WITH_TIMER' does not exist on type 'ELKAlarmPanelDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(99,31): error TS2339: Property 'ALARM_STATE_ARMED_FULLY' does not exist on type 'ELKAlarmPanelDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(100,31): error TS2339: Property 'ALARM_STATE_FORCE_ARMED_VIOLATION' does not exist on type 'ELKAlarmPanelDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(101,31): error TS2339: Property 'ALARM_STATE_ARMED_WITH_BYPASS' does not exist on type 'ELKAlarmPanelDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(117,8): error TS2339: Property 'area' does not exist on type 'ElkAlarmSensorDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(118,8): error TS2339: Property 'zone' does not exist on type 'ElkAlarmSensorDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(121,8): error TS2339: Property 'deviceFriendlyName' does not exist on type 'ElkAlarmSensorDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(122,8): error TS2339: Property 'deviceType' does not exist on type 'ElkAlarmSensorDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(123,8): error TS2339: Property 'connectionType' does not exist on type 'ElkAlarmSensorDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(124,8): error TS2339: Property 'batteryOperated' does not exist on type 'ElkAlarmSensorDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(125,8): error TS2339: Property 'physicalState' does not exist on type 'ElkAlarmSensorDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(125,29): error TS2339: Property 'SENSOR_STATE_PHYSICAL_NOT_CONFIGURED' does not exist on type 'ElkAlarmSensorDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(126,8): error TS2339: Property 'logicalState' does not exist on type 'ElkAlarmSensorDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(126,28): error TS2339: Property 'SENSOR_STATE_LOGICAL_NORMAL' does not exist on type 'ElkAlarmSensorDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(127,8): error TS2339: Property 'lastChanged' does not exist on type 'ElkAlarmSensorDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(131,15): error TS2339: Property 'isy' does not exist on type 'ElkAlarmSensorDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(131,53): error TS2339: Property 'zone' does not exist on type 'ElkAlarmSensorDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(134,15): error TS2339: Property 'physicalState' does not exist on type 'ElkAlarmSensorDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(137,16): error TS2339: Property 'logicalState' does not exist on type 'ElkAlarmSensorDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(140,15): error TS2339: Property 'logicalState' does not exist on type 'ElkAlarmSensorDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(143,16): error TS2339: Property 'physicalState' does not exist on type 'ElkAlarmSensorDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(143,38): error TS2339: Property 'SENSOR_STATE_PHYSICAL_OPEN' does not exist on type 'ElkAlarmSensorDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(143,73): error TS2339: Property 'logicalState' does not exist on type 'ElkAlarmSensorDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(143,94): error TS2339: Property 'SENSOR_STATE_LOGICAL_VIOLATED' does not exist on type 'ElkAlarmSensorDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(146,24): error TS2339: Property 'physicalState' does not exist on type 'ElkAlarmSensorDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(146,56): error TS2339: Property 'logicatState' does not exist on type 'ElkAlarmSensorDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(149,12): error TS2339: Property 'voltage' does not exist on type 'ElkAlarmSensorDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(149,33): error TS2339: Property 'voltage' does not exist on type 'ElkAlarmSensorDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(161,20): error TS2339: Property 'zone' does not exist on type 'ElkAlarmSensorDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(163,14): error TS2339: Property 'logicalState' does not exist on type 'ElkAlarmSensorDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(164,11): error TS2339: Property 'logicalState' does not exist on type 'ElkAlarmSensorDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(170,14): error TS2339: Property 'physicalState' does not exist on type 'ElkAlarmSensorDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(171,11): error TS2339: Property 'physicalState' does not exist on type 'ElkAlarmSensorDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(176,14): error TS2339: Property 'voltage' does not exist on type 'ElkAlarmSensorDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(177,11): error TS2339: Property 'voltage' does not exist on type 'ElkAlarmSensorDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(183,9): error TS2339: Property 'lastChanged' does not exist on type 'ElkAlarmSensorDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(190,32): error TS2339: Property 'SENSOR_STATE_PHYSICAL_NOT_CONFIGURED' does not exist on type 'ElkAlarmSensorDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(191,32): error TS2339: Property 'SENSOR_STATE_PHYSICAL_OPEN' does not exist on type 'ElkAlarmSensorDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(192,32): error TS2339: Property 'SENSOR_STATE_PHYSICAL_EOL' does not exist on type 'ElkAlarmSensorDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(193,32): error TS2339: Property 'SENSOR_STATE_PHYSICAL_SHORT' does not exist on type 'ElkAlarmSensorDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(196,32): error TS2339: Property 'SENSOR_STATE_LOGICAL_NORMAL' does not exist on type 'ElkAlarmSensorDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(197,32): error TS2339: Property 'SENSOR_STATE_LOGICAL_TROUBLE' does not exist on type 'ElkAlarmSensorDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(198,32): error TS2339: Property 'SENSOR_STATE_LOGICAL_VIOLATED' does not exist on type 'ElkAlarmSensorDevice'.
npm ERR! prepareGitDep src/elkdevice.ts(199,32): error TS2339: Property 'SENSOR_STATE_LOGICAL_BYPASSED' does not exist on type 'ElkAlarmSensorDevice'.
npm ERR! prepareGitDep src/isy.ts(582,27): error TS2339: Property 'zone' does not exist on type 'ElkAlarmSensorDevice'.
npm ERR! prepareGitDep src/isy.ts(621,40): error TS2339: Property 'address' does not exist on type 'ELKAlarmPanelDevice'.
npm ERR! prepareGitDep 
npm ERR! prepareGitDep 2> npm WARN install Usage of the `--dev` option is deprecated. Use `--only=dev` instead.
npm ERR! prepareGitDep npm ERR! code ELIFECYCLE
npm ERR! prepareGitDep npm ERR! errno 2
npm ERR! prepareGitDep npm ERR! isy-js@0.5.0 prepare: `tsc`
npm ERR! prepareGitDep npm ERR! Exit status 2
npm ERR! prepareGitDep npm ERR! 
npm ERR! prepareGitDep npm ERR! Failed at the isy-js@0.5.0 prepare script.
npm ERR! prepareGitDep npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! prepareGitDep 
npm ERR! prepareGitDep npm ERR! A complete log of this run can be found in:
npm ERR! prepareGitDep npm ERR!     /home/pi/.npm/_logs/2020-03-21T17_50_55_144Z-debug.log
npm ERR! prepareGitDep 
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.1 (node_modules/mocha/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})

npm ERR! premature close

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/pi/.npm/_logs/2020-03-21T17_51_04_503Z-debug.log

A subsection of that log file:

6806 verbose lifecycle isy-js@0.5.0~prepare: CWD: /home/pi/.npm/_cacache/tmp/git-clone-4418af54
6807 silly lifecycle isy-js@0.5.0~prepare: Args: [ '-c', 'tsc' ]
6808 silly lifecycle isy-js@0.5.0~prepare: Returned: code: 2  signal: null
6809 info lifecycle isy-js@0.5.0~prepare: Failed to exec prepare script
6810 verbose stack Error: isy-js@0.5.0 prepare: `tsc`
6810 verbose stack Exit status 2
6810 verbose stack     at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
6810 verbose stack     at EventEmitter.emit (events.js:198:13)
6810 verbose stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
6810 verbose stack     at ChildProcess.emit (events.js:198:13)
6810 verbose stack     at maybeClose (internal/child_process.js:982:16)
6810 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
6811 verbose pkgid isy-js@0.5.0
6812 verbose cwd /home/pi/.npm/_cacache/tmp/git-clone-4418af54
6813 verbose Linux 4.19.97-v7+
6814 verbose argv "/usr/bin/node" "/usr/lib/node_modules/npm/bin/npm-cli.js" "install" "--dev" "--prod" "--ignore-prepublish" "--no-progress" "--no-save"
6815 verbose node v10.19.0
6816 verbose npm  v6.14.3
6817 error code ELIFECYCLE
6818 error errno 2
6819 error isy-js@0.5.0 prepare: `tsc`
6819 error Exit status 2
6820 error Failed at the isy-js@0.5.0 prepare script.
6820 error This is probably not a problem with npm. There is likely additional logging output above.
6821 verbose exit [ 2, true ]
dxdc commented 4 years ago

Have seen this error as well:

npm ERR! code 128
npm ERR! Command failed: git clone --depth=1 -q -b beta https://github.com/nfarina/homebridge.git /root/.npm/_cacache/tmp/git-clone-2dffa44e
npm ERR! fatal: could not create leading directories of '/root/.npm/_cacache/tmp/git-clone-2dffa44e': Permission denied
pradeepmouli commented 4 years ago

Working on fixes. Will remove the typescript dependency, and re-deploy pre-transpiled.

On Mar 21, 2020, at 2:19 PM, dxdc notifications@github.com wrote:

Have seen this error as well:

npm ERR! code 128 npm ERR! Command failed: git clone --depth=1 -q -b beta https://github.com/nfarina/homebridge.git /root/.npm/_cacache/tmp/git-clone-2dffa44e npm ERR! fatal: could not create leading directories of '/root/.npm/_cacache/tmp/git-clone-2dffa44e': Permission denied — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/pradeepmouli/homebridge-isy-js/issues/3#issuecomment-602082666, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD5XAFI7NZOK6TPQ555DTZDRIUAMDANCNFSM4LQ77S3A.

dxdc commented 4 years ago

Thanks! Let me know, would be happy to test.

pradeepmouli commented 4 years ago

should be fixed.

dxdc commented 4 years ago

@pradeepmouli thanks! At least the installation seems to be working now. Will report back after having a chance to do some testing with the plugin, maybe in a few weeks I hope.