I have two test.js and x.js in the same directory:
Expected : require returns undefined , so nothing is registered.
Actual : node test.js gives me Error: Cannot find module 'x.js' (stack multiplicity is omitted for brevity).
The situation is similar to this other question , with the differences that I used eval rather than new Function and require defined, it just unexpectedly works.
Why is this?
How to correctly require module in eval 'd code?
Anko source share