eris-boiler icon indicating copy to clipboard operation
eris-boiler copied to clipboard

Full Module Path?

Open oshinowo-stephen opened this issue 2 years ago • 1 comments

An error was presented:

Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/home/satori/DarkMagician/apps/magician/src/commands/ping' imported from /home/satori/DarkMagician/apps/magician/node_modules/@hephaestus/core/dist/index.js
Did you mean to import /home/satori/DarkMagician/apps/magician/src/commands/ping.ts?

But unsure of its behavior... possibly reinstallation without similar path-transformation packages causes this cause this was fine before. Still, at the current fact why don't we give it the full path including the extension? https://github.com/alex-taxiera/eris-boiler/blob/9b4b71f3b44f23931aefe10b226c1371c525a603/packages/core/src/modules/loadable/file-loader.ts#L25 I'm pointing here ^ mainly

Now the regex in general could be helpful for identifying the current file as a js, ts, etc: https://github.com/alex-taxiera/eris-boiler/blob/9b4b71f3b44f23931aefe10b226c1371c525a603/packages/core/src/modules/loadable/constants.ts#L1 But I'm still confused about why we had to trim off the extension and was it necessary?

oshinowo-stephen avatar Jul 03 '22 12:07 oshinowo-stephen

we can and should keep the extension

alex-taxiera avatar Jul 03 '22 20:07 alex-taxiera