Closed MartijnSanders closed 2 years ago
Can you tell me which versions are you using of foundry/5e/module, and how is your setup? Are you running this in the Forge or another hosting, or anything particular?
setup: this is a selfhosted instance which is fronted with nginx as reverseproxy. Foundry version 9, build 249. The instance has routePrefix 'vtt' and uses dnd 5e - Fifth Edition System 1.5.7 and Hero Creation Tool 1.7.1.
foundry.utils.getRoute('../../systems/dnd5e/module/apps/proficiency-selector.js') yields
/vtt/../../systems/dnd5e/module/apps/proficiency-selector.js
and results in in attempt to load (according to the firefox developer console)
/systems/dnd5e/module/apps/proficiency-selector.js
When line 1375 is changed to
_const { default: ProficiencySelector } = (await import(/${ROUTE_PREFIX}/systems/dnd5e/module/apps/proficiency-selector.js
));_
the hero creation button in the actor tab shows up and i can create an actor using the wizard.
just removing the ../.. also works
const { default: ProficiencySelector } = (await import(foundry.utils.getRoute('/systems/dnd5e/module/apps/proficiency-selector.js')));
Hmm you mean the routePrefix on path/to/FoundryVTT/Data/options.json
? I will see if I can test this locally.. else what I could do is make a release with this more or less blindly, I understand the change but I fear it might have some sideeffects hahah
Btw this whole shenanigans will be rendered obsolete with the next version of DND5e as they are exposing the ProficiencySelector directly and I would not need to load it. Are you using HCT now/soon or were you playing with it planning for the future? Maybe it is feasible to work around it as-is and wait for the next release. There's a lot of work planned for after the next system versions lands, but I can rush this one first and use the exported ProficiencySelector, then continue work with the rest.
No worries, no rush is needed. I fixed it locally, and no updates are needed for me personally at this moment.
Oh if you have it working locally for your needs, its a relief already :) I don't expect any version to be released before the next system update btw, so you should be safe to update, bar some critical bug appearing in the wild.
This will be fixed on 1.8.0 (do notice it will require 5e 1.6.0)
The line const { default: ProficiencySelector } = (await import(foundry.utils.getRoute('../../systems/dnd5e/module/apps/proficiency-selector.js')));
tries to load the wrong url. a url that does not reflect the routePrefix set in the foundryvtt options.
This is something that my firefox dev-console shows as cannot load the module with source ‘https://systems/dnd5e/module/apps/proficiency-selector.js’ failed.
I am currently investigating why the 'hero creator' does not show.