iobroker-community-adapters / ioBroker.ring

Ring Video Doorbell Adapter
MIT License
29 stars 13 forks source link

Fatal error node 20 standard installation IoBroker running ring-auth-cli #697

Open elzershark opened 3 months ago

elzershark commented 3 months ago

# Unix 
cd /opt/iobroker/node_modules/iobroker.ring/
npm i ring-client-api

cd /opt/iobroker/node_modules/iobroker.ring/node_modules/ring-client-api
node ring-auth-cli

npm WARN deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
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
npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated chokidar@2.1.8: Chokidar 2 does not receive security updates  since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
npm WARN deprecated sinon@15.2.0: 16.1.1

added 1087 packages, and audited 1088 packages in 1m

130 packages are looking for funding
  run `npm fund` for details

6 high severity vulnerabilities

To address issues that do not require attention, run:
  npm audit fix

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.
elzershark@elzershark-LIFEBOOK-E736:/opt/iobroker/node_modules/iobroker.ring$ cd /opt/iobroker/node_modules/iobroker.ring/node_modules/ring-client-apielzershark@elzershark-LIFEBOOK-E736:/opt/iobroker/node_modules/iobroker.ring/node_modules/ring-client-api$ node ring-auth-cli node:internal/modules/cjs/loader:1148
  throw err;
  ^

Error: Cannot find module '/opt/iobroker/node_modules/iobroker.ring/node_modules/ring-client-api/ring-auth-cli'
    at Module._resolveFilename (node:internal/modules/cjs/loader:1145:15)
    at Module._load (node:internal/modules/cjs/loader:986:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:174:12)
    at node:internal/main/run_main_module:28:49 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

Node.js v20.13.1

version of adapter: v5.0.10
version of js-controller: 5.0.19
nodeJS version installed: 20.13.1
Operating system type / version: Linux/Ubuntu
mcm1957 commented 3 months ago

Please add release version information to every problem reported:

mcm1957 commented 2 months ago

NOTE: The error is NOT raised during usage of adapter but while starting an external program (which is recommended / reuired but not controller by ioBroker development).

mcm1957 commented 2 months ago

@elzershark

Did you paste all those commands into shell at once?

# Unix 
cd /opt/iobroker/node_modules/iobroker.ring/
npm i ring-client-api

cd /opt/iobroker/node_modules/iobroker.ring/node_modules/ring-client-api
node ring-auth-cli

Your output looks suspect as the npm output should normally occure after npm i but before the node ... command.

Please retry setup and enter commands line by line and copy the resulting output using some terminal emulator not inserting addional spaces.

If the sequence works using node 18 and does nozt work using node 20 an issue at ring-client-api could be useful as this program is not developed by ioBroker developers.

elzershark commented 2 months ago

Das ist nur ein Hinweis von mir, das die Befehle mit Node 20 nicht funktionieren. Es müsste an Node 20 angepasst werden. Node 20 ist seit 24.05. Standard bei IoBorker.

Damit der Adapter funktioniert, reicht es aus, wenn man den Befehl eingibt: Dadurch bekommt man den Tocken:

npx -p ring-client-api ring-auth-cli

--#

This is just a note from me that the commands don't work with Node 20. It would have to be adapted to Node 20. Node 20 has been active since May 24th. Standard at IoBorker.

In order for the adapter to work, it is enough to enter the command: This is how you get the tick:

npx -p ring-client-api ring-auth-cli

mcm1957 commented 2 months ago

Mhmm

npx sollte ident zu npm i .. mit nachfolgendem node ... sein.

ABER wichtiger ist die Lösung:

Verstehe ich dich richtig: npx -p ring-client-api ring-auth-cli anstelle der dokumentierten Befehlssequenz funktioniert? Wenn das der Fall ist könnte ich die README.md anpassen (oder du erstellst einen PR :-) ). Das sollte ja dann für andere hilfreich sein.

elzershark commented 1 month ago

Mhmm

npx sollte ident zu npm i .. mit nachfolgendem node ... sein.

ABER wichtiger ist die Lösung:

Verstehe ich dich richtig: npx -p ring-client-api ring-auth-cli anstelle der dokumentierten Befehlssequenz funktioniert? Wenn das der Fall ist könnte ich die README.md anpassen (oder du erstellst einen PR :-) ). Das sollte ja dann für andere hilfreich sein.

Also bei mir funktioniert es (Ubuntu) und Debian. Einfach selber testen. Mit Debian hab ich grad getestet. Und da ist nichts installiert außer Node 20. Also auch kein iobroker oder sonstwas.