otaviojr / node-red-contrib-smartthings

Allows you to control your devices and get their status using NodeRed
MIT License
32 stars 16 forks source link

Loading dependency from github #27

Closed dceejay closed 4 years ago

dceejay commented 4 years ago

Is there a particular reason you need to load your smartthings-node dependency direct from github ? Doing so forces clients to have to install git or they get an error trying tom install your nodes.

    "promise": "^8.0.3",
    "smartthings-node": "https://github.com/otaviojr/smartthings-node.git",
    "http-signature": "*",

without git fails as below

2020-03-08T15:04:08.959Z [err] npm
2020-03-08T15:04:08.960Z [err] ERR! code ENOENT
2020-03-08T15:04:08.960Z [err] npm ERR! syscall spawn git
2020-03-08T15:04:08.960Z [err] npm ERR! path git
2020-03-08T15:04:08.960Z [err] npm ERR! errno ENOENT
2020-03-08T15:04:08.960Z [err] npm
2020-03-08T15:04:08.960Z [err] ERR! enoent Error while executing:
2020-03-08T15:04:08.960Z [err] npm ERR!
2020-03-08T15:04:08.960Z [err] enoent undefined ls-remote -h -t https://github.com/otaviojr/smartthings-node.git
2020-03-08T15:04:08.960Z [err] npm ERR! enoent
2020-03-08T15:04:08.960Z [err]
2020-03-08T15:04:08.960Z [err] npm ERR! enoent
2020-03-08T15:04:08.960Z [err]
2020-03-08T15:04:08.960Z [err] npm ERR! enoent spawn git ENOENT
2020-03-08T15:04:08.960Z [err] npm
2020-03-08T15:04:08.960Z [err] ERR! enoent This is related to npm not being able to find a file.
2020-03-08T15:04:08.960Z [err] npm ERR!
2020-03-08T15:04:08.961Z [err] enoent
rossyell commented 4 years ago

I am having what I think is the same error on a windows box. I do not have the error when installing to a raspberry Pi. I fixed this by installing Git on the device.

2020-03-10T23:44:02.784Z Install : node-red-contrib-smartthings 0.0.20

2020-03-10T23:44:03.541Z npm.cmd install --no-audit --no-update-notifier --save --save-prefix="~" --production node-red-contrib-smartthings@0.0.20 2020-03-10T23:44:31.944Z [err] npm 2020-03-10T23:44:31.944Z [err] ERR! 2020-03-10T23:44:31.944Z [err] code 2020-03-10T23:44:31.945Z [err] ENOENT 2020-03-10T23:44:31.946Z [err] npm 2020-03-10T23:44:31.947Z [err] ERR! syscall spawn git