node-wot icon indicating copy to clipboard operation
node-wot copied to clipboard

chore(CI): add Node.js 22 to matrix

Open danielpeintner opened this issue 1 year ago • 9 comments

fixes https://github.com/eclipse-thingweb/node-wot/issues/1273

danielpeintner avatar Apr 26 '24 07:04 danielpeintner

npm ERR! code 1 npm ERR! path /home/runner/work/node-wot/node-wot/node_modules/node-mbus

~~mbus~~ modbus seems to cause issues on Node.js 22

danielpeintner avatar Apr 26 '24 09:04 danielpeintner

BTW, I created https://github.com/Apollon77/node-mbus/issues/123

danielpeintner avatar Apr 26 '24 09:04 danielpeintner

I messed up mbus with modbus 🙈

danielpeintner avatar Apr 29 '24 12:04 danielpeintner

The new error seems to stem from a wrong node installation!?!

https://github.com/eclipse-thingweb/node-wot/actions/runs/8878604576/job/24374716602?pr=1274

danielpeintner avatar Apr 29 '24 12:04 danielpeintner

Seems to be related with https://github.com/nodejs/node/issues/52682 and a possible fix can be found here https://github.com/nodejs/node/issues/52682#issuecomment-2087973587

Let's wait a bit. I assume it gets fixed with a new minor version soon.

danielpeintner avatar May 02 '24 08:05 danielpeintner

Should we go with this suggestion ?

relu91 avatar May 02 '24 17:05 relu91

Should we go with this suggestion ?

No longer needed since the GH workflow should pick the latest Node.js 22.x version. Re-running the workflow seems to show that

https://github.com/eclipse-thingweb/node-wot/actions/runs/8878604576/job/24558179052?pr=1274#step:3:91

Anyhow, we are now running into other issues 😒

Now, I think they are really mbus-related. https://github.com/eclipse-thingweb/node-wot/actions/runs/8878604576/job/24558179052?pr=1274#step:5:25

I will take a closer look next week...

danielpeintner avatar May 03 '24 14:05 danielpeintner

Created https://github.com/Apollon77/node-mbus/issues/124

danielpeintner avatar May 09 '24 07:05 danielpeintner

mbus issue should be resolved (see https://github.com/Apollon77/node-mbus/issues/124#issuecomment-2102852295). We just need to wait till 2.24 is published.

danielpeintner avatar May 10 '24 07:05 danielpeintner

We now have some other issues in the step "Test with coverage report"

I do not really understand "what" is failing. I just see "passing" or "pending"

Anyhow, it fails with Error: Process completed with exit code 1. see https://github.com/eclipse-thingweb/node-wot/actions/runs/9252944897/job/25847856047?pr=1274#step:9:6944

danielpeintner avatar Jun 05 '24 15:06 danielpeintner

I am seeing logs like this for Node.js 22

(node:4256) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead.

This might be solved by updating AJV. see https://stackoverflow.com/a/77929792

Grr: There are more dependencies: see

+-- @node-wot/[email protected] -> .\packages\binding-http
| `-- [email protected]
|   `-- [email protected]
|     `-- [email protected]
|       `-- [email protected]
|         `-- [email protected] deduped
+-- @node-wot/[email protected] -> .\packages\browser-bundle
| `-- [email protected]
|   +-- [email protected]
|   `-- [email protected]
|     `-- [email protected]
`-- @node-wot/[email protected] -> .\packages\cli
  `-- [email protected]
    `-- [email protected]
      `-- [email protected]

OR

2024-06-05T15:17:05.296Z node-wot:cli:cli-default-servient:error Servient found error in privileged script 'script' Bad synchronous error in Servient sandbox
(node:6876) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 uncaughtException listeners added to [process]. MaxListeners is 10. Use emitter.setMaxListeners() to increase limit

Here I am not sure. Is it a "vm2" issue? @relu91

danielpeintner avatar Jun 06 '24 13:06 danielpeintner

Tested locally and I was able to reproduce the error. All the packages are working correctly but mbus:

npm run test -w packages/binding-mbus/

> @node-wot/[email protected] test
> mocha --require ts-node/register --extension ts



  mbus client test
    ✔ should override form values with URL
    read resource
      ✔ should throw exception for missing offset

  mbus connection test
npm error Lifecycle script `test` failed with error:
npm error Error: command failed
npm error   in workspace: @node-wot/[email protected]
npm error   at location: E:\Progetti\reluWoT\packages\binding-mbus

I don't have that much time to investigate but it is the only package that is falling (you can verify yourself by excluding it by the workspaces list).

relu91 avatar Jun 07 '24 13:06 relu91