Isaksson / node-red-contrib-unifi

MIT License
50 stars 19 forks source link

Installations fails: cookie-agent #87

Closed Pino72de closed 1 year ago

Pino72de commented 1 year ago

2022-09-15T12:27:18.886Z npm.cmd install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict node-red-contrib-unifi@0.2.9 2022-09-15T12:27:27.141Z [err] npm 2022-09-15T12:27:27.141Z [err] WARN http-cookie-agent@4.0.2 requires a peer of tough-cookie@^4.0.0 but none is installed. You must install peer dependencies yourself. 2022-09-15T12:27:27.142Z [err] 2022-09-15T12:27:27.144Z [out] + node-red-contrib-unifi@0.2.9 2022-09-15T12:27:27.144Z [out] updated 1 package in 4.913s 2022-09-15T12:27:27.185Z rc=0

I am on windows 10 and node red is running within iobroker.

any advice?

Thanks

Isaksson commented 1 year ago

Hello. My guess is that you are using an outdated version of Nodejs, please verify and get back to me. Use Node-Red Version 3.x.x and Nodejs >=14.18.0

Pino72de commented 1 year ago

NodeJs is 14.18.0 and Node Red is 3.2.0

Pino72de commented 1 year ago

NPM is 6.14.15

Pino72de commented 1 year ago

grafik

Pino72de commented 1 year ago

I could try to update to Node Red 3.3.1 and see if that changes anything...?

Isaksson commented 1 year ago

I dont think that updating Node-RED will solve the issue but its good to be at the latest update, and maybe update Node.js to 14.20

Isaksson commented 1 year ago

I will make some tests and see if I could replicate your issue

Isaksson commented 1 year ago

By the way, its seems like the node has been updated from your log, after reboot does it work as it should or did the installation fail?

Pino72de commented 1 year ago

No it did not install, node is not in the palette list and trying again gave the same error.

Pino72de commented 1 year ago

Ah no, it only shows which version is the newest and available....I had Node 16.x and a lot of adapters did not work or I could not install anymore so I went back to 14.x where everything works.....till now :-) Your Unifi is the first that gave me an error

Pino72de commented 1 year ago

Maybe this helps:

`

node-red.0 2022-09-15 16:20:25.283 error 15 Sep 16:20:25 - [error] Error: Install failed at C:\Program Files\iobroker\SmartHome\node_modules\@node-red\registry\lib\installer.js:285:25 at processTicksAndRejections (internal/process/task_queues.js:95:5)
node-red.0 2022-09-15 16:20:25.280 warn 15 Sep 16:20:25 - [warn] ------------------------------------------15 Sep 16:20:25 - [warn] undefined15 Sep 16:20:25 - [warn] ------------------------------------------
node-red.0 2022-09-15 16:20:25.278 warn 15 Sep 16:20:25 - [warn] Installation of module node-red-contrib-unifi failed:
node-red.0 2022-09-15 16:20:25.259 warn 15 Sep 16:20:25 - [warn] [node-red-contrib-unifi] Node module cannot be loaded on this version. Requires: >=3.0.0
node-red.0 2022-09-15 16:19:42.240 warn 15 Sep 16:19:42 - [warn] No active project : using default flows file
node-red.0 2022-09-15 16:19:33.238 warn 15 Sep 16:19:33 - [warn] [node-red-contrib-unifi] Node module cannot be loaded on this version. Requires: >=3.0.0

`

Isaksson commented 1 year ago

That error indicates that the Node-RED version is below 3.0.0 and that why the module does not install.

Pino72de commented 1 year ago

Ok, so that's strange...let me install the newest over it and see....

Pino72de commented 1 year ago

Ok, I found the problem...even though iobroker says he installed 3.3.x node red is still on 2.2 and gave me the welcome tour of 2.2...I think I will have to completely setup node red again. THanks for your help!

Isaksson commented 1 year ago

That's good, then we know the reason.