twocolors / node-red-contrib-esphome

Node-RED nodes to ESPhome devices
MIT License
18 stars 5 forks source link

Node-RED install error #2

Closed guyluz11 closed 1 year ago

guyluz11 commented 1 year ago

Getting an error while trying to install this package from the Node-RED ide

image

-----------------------------------------------------------
2023-01-20T14:57:34.452Z Install : node-red-contrib-esphome 0.0.2

2023-01-20T14:57:34.470Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict node-red-contrib-esphome@0.0.2
2023-01-20T14:57:34.714Z [err] npm WARN config production Use `--omit=dev` instead.
2023-01-20T14:57:36.557Z [err] npm
2023-01-20T14:57:36.557Z [err]  
2023-01-20T14:57:36.557Z [err] ERR! code
2023-01-20T14:57:36.558Z [err]  ENOENT
2023-01-20T14:57:36.558Z [err] npm
2023-01-20T14:57:36.558Z [err]  
2023-01-20T14:57:36.558Z [err] ERR!
2023-01-20T14:57:36.558Z [err]  syscall
2023-01-20T14:57:36.558Z [err]  spawn git
2023-01-20T14:57:36.558Z [err] npm
2023-01-20T14:57:36.558Z [err]  
2023-01-20T14:57:36.558Z [err] ERR!
2023-01-20T14:57:36.558Z [err]  
2023-01-20T14:57:36.558Z [err] path git
2023-01-20T14:57:36.559Z [err] npm
2023-01-20T14:57:36.559Z [err]  ERR!
2023-01-20T14:57:36.559Z [err]  errno
2023-01-20T14:57:36.559Z [err]  -2
2023-01-20T14:57:36.560Z [err] npm 
2023-01-20T14:57:36.560Z [err] ERR! enoent
2023-01-20T14:57:36.560Z [err]  An unknown git error occurred
2023-01-20T14:57:36.560Z [err] npm
2023-01-20T14:57:36.560Z [err]  ERR! 
2023-01-20T14:57:36.560Z [err] enoent This is related to npm not being able to find a file.
2023-01-20T14:57:36.560Z [err] npm 
2023-01-20T14:57:36.560Z [err] ERR! 
2023-01-20T14:57:36.560Z [err] enoent 
2023-01-20T14:57:36.562Z [err] 
2023-01-20T14:57:36.562Z [err] npm 
2023-01-20T14:57:36.562Z [err] ERR!
2023-01-20T14:57:36.562Z [err]  A complete log of this run can be found in:
2023-01-20T14:57:36.562Z [err] npm
2023-01-20T14:57:36.562Z [err]  ERR!
2023-01-20T14:57:36.562Z [err]      /root/snap/node-red/854/.npm/_logs/2023-01-20T14_57_34_694Z-debug-0.log
2023-01-20T14:57:36.570Z rc=254
guyluz11 commented 1 year ago

As described here https://stackoverflow.com/questions/17509669/how-to-install-an-npm-package-from-github-directly

I think that in order to solve this we need to add git+https://github.com/..., will open pr now so that we can test it together.

guyluz11 commented 1 year ago

It looks like the fix didn't solve the issue. Tested in the version 0.0.3. Please reopen the issue

guyluz11 commented 1 year ago

I have created the question in NodeRed forums. https://discourse.nodered.org/t/nodered-snap-package-with-git-dependency-error/74287

I'm suspecting that because I have installed NodeRed from the snap store it might not have an access to the git command.

Unfortunately I cannot install NodeRed from npm because I'm getting errors.

I think the best option to solve this issue will be to just upload the package esphome-native-api (fork) to npm store.

twocolors commented 1 year ago

I will probably publish a fork soon, there in the fork I need to rewrite a large piece of code ...

until there is no time

p.s. use the docker (:

guyluz11 commented 1 year ago

I will probably publish a fork soon, there in the fork I need to rewrite a large piece of code ...

until there is no time

p.s. use the docker (:

Sounds great

Update me whenever it is published

twocolors commented 1 year ago

@guyluz11 try node-red-contrib-esphome@0.0.5

guyluz11 commented 1 year ago

I have successfully installed there package in the new version.

Thanks 😁