require() unexpected behaviour
leumasme opened this issue ยท 1 comments
I wanted to make my own module.
I created a folder called temmmod in the modules folder and a file called temmmod.js inside it.
when i now try to require("temmmod") it doesnt work but asks if i meant modules/temmmod/temmmod
When i then change require("temmod") to require("temmod/temmod.js") everything works. understandable.
but then... why does require("utils") work? the utils moudle is in modules/utils/utils.js, but require still finds it. Why does require-ing a folder work for utils but doesnt work for my custom module?