Closed Noxdor closed 2 years ago
So it seems the assertion error comes from the node package (node-opcua). It checks for a correct node version and instead reads the deno version as node version (see my original post above and compare the error message and my installed deno version). Anyone having an idea how to trick the module into believing me the correct node version is installed?
Thanks for @Noxdor, this problem is due to the fact that we when we shim process.version
we use current Deno version for this purpose. I believe this is wrong and will lead to more problem down the road. Quick and easy fix would be to hard code this value to the latest Node LTS version, so right now that would be 16.11.1
.
CC @kt3k @AaronO what do you think?
Describe the bug
When I'm trying to import a module using the Deno Node API, I get an assertion error, that the current nodejs version is not sufficient. Though it should be. Running
which node
I get.../.nvm/versions/node/v14.17.6/bin/node
which is higher than the required 8.0.0. It tells me though, that the current nodejs version is 1.14.0. Where does this check happen?Steps to Reproduce
node-opcua
module in a simple deno file.Expected behavior
Logging the imported object successfully.
Environment
4.19.128-microsoft-standard #1 SMP Tue Jun 23 12:58:10 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
(WSL 2)