NuSkooler / enigma-bbs

ENiGMA½ BBS Software
https://nuskooler.github.io/enigma-bbs/
BSD 2-Clause "Simplified" License
529 stars 104 forks source link

Cannot find module in Mods path #541

Closed dream7prod closed 1 month ago

dream7prod commented 1 month ago

Describe the Bug I'm trying to create a menu module mod, according to the documentation I placed my module in /mods/mymodule/mymodule.js in the hjson file there's :

menus: { myModMainMenu: { desc: My Mod Main Menu module: mymodule ...

This doesn't work, as in the logs I got this : (...) "err":{"message":"Cannot find module '/enigma-bbs/core/mymodule/mymodule.js' (...)

So the system tries to find the module in the core directory instead of the mods one...

After lots of tries this works : module: ../../../enigma-bbs/mods/mymodule/mymodule

is this a bug or I am doing something wrong ?

As I use Docker I can't place my mod in the core directory

Thanks for your help.

NuSkooler commented 1 month ago

Try @userMod:mymodule. Without the prefix, the system will look for core modules

dream7prod commented 1 month ago

This is in fact : @userModule:mymodule userMod doesn't work for me. Thank you :)