When running a specific javascript in node, I get a console.log() message that is not in the current code, but was in a previous version of the code. The code in question is in a custom module. I suspect node cache is corrupted. The next thing the console shows is an error, but I wouldn't be surprised if my code has an error. Seeing an error doesn't surprise me. But seeing a console.log message that shouldn't be there does.
I powered down/up the computer. Prior to loading the module, I tried: delete require.cache[require.resolve('')]; But nothing I've tried has worked.
I did read node.js require() cache - possible to invalidate? . But it did not lead me to a solution. The module in question requires 2 modules that come with node. I did not try deleting them since they don't see to be an issue.
I'm new with node and anything more than simple js. Do you think cache is the problem? Is there a better way to clear it? My next attempt may be to uninstall node and then reinstall it, but I'm hoping someone has a better idea.
I am exporting the module with: module.exports = async (param1, param2){...} I am loading the module with: oModule = require('').