NodeJs support for newer nodes

Hey guys, I have backend in NestJs (NodeJs) and I’m trying to use @concordium/web-sdk (^8.1.0) for contract handling. As I see package is compatible with node 16.
Problem is my project is built on a node version 20.
Is there any way to avoid those errors and make it work with node 20 so I don’t need to downgrade my already existing project node version to 16

P.S. really enjoy using this support from Concordium :smiley:

Hi there!

this seems like you need to specify the correct moduleResolution strategy in your tsconfig.json. You should not have to change the version of NodeJS.

Hope this helps!

Sorry I expressed wrongly. When I change moduleResolution problem is my whole backend gets errors on node16 moduleResolution. So I was thinking is there any way to make @concordium/web-sdk package to work with "module": "commonjs"

There is not, sorry. Take it as an opportunity to refactor to ES modules. It’s the general direction of the JS/TS community :slightly_smiling_face:

What kind of errors do you get?

Best regards,
Søren