Home > Net >  cannot find module node:events but node version is 16.6
cannot find module node:events but node version is 16.6

Time:02-26

My code is getting this error with using a html script using discord.js runned by electron(nodeIntergation is true and node is working in html)but I get the error: cannot find module node:events when I search it on web it says upgrade your node to 16.6 but it still don't work on 16.6 enter image description here

Here is the node -v command to proof enter image description here

I dont't know why this is happening can someone help?

CodePudding user response:

I don't know is this a good solution or gonna cause bugs but when I change some of the code in module's code it just worked(changing node:x to x just an example not real module)thanks to @Darren Cook because the thing he said in the comments make me looking to some documention on node.js and I see the modules start to calling module_name to node:module_name from some version(I guess 16.6)like I said I don't know is this a good solution but worked for me no bugs till this moment

  • Related