Jey-Cee / ioBroker.heytech

Control HEYtech from iobroker
MIT License
4 stars 4 forks source link

Compatibility check and testing for Node.js 14 and 16 #29

Closed ioBrokerChecker closed 2 years ago

ioBrokerChecker commented 3 years ago

Dear Adapter developer,

Node.js 14 is now available for a year and Node.js 16 was release just some days ago and will become LTS by October 2021. We plan to update the ioBroker Node.js recommendation (currently 12.x) to 14.x later this year.

Please check your adapter with Node.js 14 especially, and ideally also directly with Node.js 16

Please add both versions to the adapter testing which is executed on commits.

If your adapter requires a certain minimum version of Node.js please set the 'engine' setting in package.json accordingly! Please also do this if the adapter is not able to work in certain Node.js versions, so that ioBroker can prevent users from installing te adapter if not compatible!

On questions please talk to us at https://github.com/ioBroker/ioBroker.js-controller/issues/1138

Please close the issue after you checked it.

Thank you very much for your support!

guidau commented 2 years ago

Hi all,

I wish you a Merry Christmas and a relaxing holiday!

After updating the Node.js version from 12 to 14, my HeyTech adapter is not working anymore because the required Node.js version >=8 <13, actual version v14.18.2 does not match.

host.iobroker 2021-12-25 17:36:19.922 warn startInstance heytech.0: instance disabled because of Node.js version mismatch host.iobroker 2021-12-25 17:36:19.920 info "system.adapter.heytech.0" disabled host.iobroker 2021-12-25 17:36:19.904 warn startInstance heytech.0: required Node.js version >=8 <13, actual version v14.18.2 host.iobroker 2021-12-25 17:36:19.825 info "system.adapter.heytech.0" enabled

Thank you very much for your support! Cheers Guidau

ansgarschulte commented 2 years ago

Hi Merry Christmas Sorry. But i already tried it too and I have problems to get it to work. The problem is one dependency for telnet connections. I think I have to reimplement some parts of the plugin or try to fix the other library. So a lot of work....

ansgarschulte commented 2 years ago

@guidau Happy New Year. and FYI: I found the bug. Will publish an update soon.

ansgarschulte commented 2 years ago

Intermediate Fix: Install via Github Url: https://github.com/Jey-Cee/ioBroker.heytech

guidau commented 2 years ago

@ansgarschulte Happy New Year Many thanks for your support. I'm on holidays and I'll be back next weekend. Cheers Guido

guidau commented 2 years ago

@ansgarschulte Today I installed the update via beta repro, Github URL over ioBroker with no success. It seems to be that the installation procedure still looking for the node.js version >=8 <13. Do you habe any advice ?

`Befehl ausführen Process exited with code 0 weniger mehr

$ iobroker url https://github.com/Jey-Cee/ioBroker.heytech --host iobroker --debug

install Jey-Cee/ioBroker.heytech#5368fe736c8404e009376bdd4750279306a02966

NPM version: 6.14.15

npm install Jey-Cee/ioBroker.heytech#5368fe736c8404e009376bdd4750279306a02966 --prefix "/opt/iobroker" (System call)

npm ERR! code ENOTSUP

npm ERR! notsup Unsupported engine for iobroker.heytech@1.0.5: wanted: {"node":">=8 <13"} (current: {"node":"14.18.2","npm":"6.14.15"})

npm ERR! notsup Not compatible with your version of node/npm: iobroker.heytech@1.0.5npm ERR! notsup Not compatible with your version of node/npm: iobroker.heytech@1.0.5npm ERR! notsup Required: {"node":">=8 <13"}npm ERR! notsup Actual: {"npm":"6.14.15","node":"14.18.2"}

npm ERR! A complete log of this run can be found in:

npm ERR! /opt/iobroker/.npm/_logs/2022-01-09T11_02_19_215Z-debug.log

upload [4] heytech.admin /opt/iobroker/node_modules/iobroker.heytech/admin/words.js words.js application/javascript

upload [3] heytech.admin /opt/iobroker/node_modules/iobroker.heytech/admin/style.css style.css text/css

upload [2] heytech.admin /opt/iobroker/node_modules/iobroker.heytech/admin/index_m.html index_m.html text/html

upload [1] heytech.admin /opt/iobroker/node_modules/iobroker.heytech/admin/heytech.png heytech.png image/png

upload [0] heytech.admin /opt/iobroker/node_modules/iobroker.heytech/admin/admin.d.ts admin.d.ts video/mp2t

Update "system.adapter.heytech.0"

Process exited with code 0`

ansgarschulte commented 2 years ago

@guidau I had the same problem... I managed it with a manuel "npm install https://github.com/Jey-Cee/ioBroker.heytech" via console. But I made now a PR for Stable Repo: https://github.com/ioBroker/ioBroker.repositories/pull/1588

Apollon77 commented 2 years ago

@ansgarschulte The better command in iobroker environment would be "iob install https://github.com/Jey-Cee/ioBroker.heytech" or even better to use admin and install from npm when version is already there.

IF someone uses the direct npm command to update an adapter you MUST also run "iob upload heytech" afterwards, else meta data are out of sync which can produce different issues

guidau commented 2 years ago

@ansgarschulte Do you know when the PR will be transferred to the stable repo ? Does this happen overnight ?

ansgarschulte commented 2 years ago

@guidau It has been merged now. Please try again. thx @Apollon77

guidau commented 2 years ago

@ansgarschulte Even with the new stable repo I unfortunately still get the same error message @Apollon77 I entered your suggested command "iob install https://github.com/Jey-Cee/ioBroker.heytech" on the shell, here the syntax seems to be wrong. Do I have to uninstall the installed adapter before and then reinstall again via the adapter command.

ansgarschulte commented 2 years ago

maybe that uninstall helps....

guidau commented 2 years ago

I also have the same problem when I want to uninstall the adapter....

`$ iobroker del heytech

Delete adapter "heytech"

host.iobroker Counted 1 instances of heytech

host.iobroker Counted 1 meta of heytech

host.iobroker Counted 1 adapter for heytech

host.iobroker Counted 21 channels of heytech

host.iobroker Counted 100 states of heytech

host.iobroker Counted 14 states of system.adapter.heytech

host.iobroker Counted 48 states (heytech.*) from states

host.iobroker Counted 14 states (system.adapter.heytech.*) from states

host.iobroker Counted 3 objects of heytech

host.iobroker file heytech.admin deleted

host.iobroker object heytech deleted

host.iobroker object heytech.admin deleted

host.iobroker Deleting 141 object(s).

host.iobroker Deleting 62 state(s).

npm uninstall iobroker.heytech --loglevel error --prefix "/opt/iobroker" (System call)

npm ERR! code ENOTSUP

npm ERR! notsup Unsupported engine for iobroker.heytech@1.0.5: wanted: {"node":">=8 <13"} (current: {"node":"14.18.2","npm":"6.14.15"})

npm ERR! notsup Not compatible with your version of node/npm: iobroker.heytech@1.0.5npm ERR! notsup Not compatible with your version of node/npm: iobroker.heytech@1.0.5npm ERR! notsup Required: {"node":">=8 <13"}npm ERR! notsup Actual: {"npm":"6.14.15","node":"14.18.2"}

npm ERR! A complete log of this run can be found in:npm ERR! /opt/iobroker/.npm/_logs/2022-01-09T19_35_29_961Z-debug.log

Error deleting adapter heytech from disk: Error: host.iobroker: Cannot uninstall iobroker.heytech: 1

You might have to delete it yourself!

Process exited with code 0`

ansgarschulte commented 2 years ago

try: npm uninstall iobroker.heytech

guidau commented 2 years ago

same result with "npm uninstall iobroker.heytech": `root@iobroker:/opt/iobroker# npm uninstall iobroker.heytech npm ERR! code ENOTSUP npm ERR! notsup Unsupported engine for iobroker.heytech@1.0.5: wanted: {"node":">=8 <13"} (current: {"node":"14.18.2","npm":"6.14.15"}) npm ERR! notsup Not compatible with your version of node/npm: iobroker.heytech@1.0.5 npm ERR! notsup Not compatible with your version of node/npm: iobroker.heytech@1.0.5 npm ERR! notsup Required: {"node":">=8 <13"} npm ERR! notsup Actual: {"npm":"6.14.15","node":"14.18.2"}

npm ERR! A complete log of this run can be found in: npm ERR! /opt/iobroker/.npm/_logs/2022-01-09T22_00_45_899Z-debug.log`

ansgarschulte commented 2 years ago

rm -fR node_modules/iobroker.heytech/

guidau commented 2 years ago

There is a path node_modules but no subfolder iobroker.heytech, also in my life system, where I have not yet changed anything on the Heytech adapter !

Does it make sense to stop the discussion here on Github and maybe continue it on the ioBroker forum ? I'll try to look at the options of the Nodes.js commands this afternoon to see if I can force the uninstall here.

guidau commented 2 years ago

@ansgarschulte Thank you very much for your help. I managed it now, I temporarily set in the local NPM configuration file (.npmrc) the variable "engine-strict" (NPM version check) from true to false and then uninstalled the Heytech adapter. After that I was able to install the new 1.06 version without problems with the NPM version check enabled.

This link helped me: Prevent npm install for not supported Node.js versions

ansgarschulte commented 2 years ago

glad to here 😀