Environment Details
- Foundry Core Version: 12.331
- System & Version: Alien RPG 3.2.1
- OS & Browser: Windows & Firefox
- Hosting:
Self Hosted
Describe the bug
Installation of the module and initial usage were fine. Until I restarted my Foundry to set some user rights. After that the module crashes with this error in the console:
Uncaught (in promise) TypeError: (intermediate value)().modules.get(...).data is undefined
[Detected 2 packages: gm-screen(3.0.1), lib-wrapper(1.13.2.0)]
_gmScreenMigrate migration.js:15
<anonymous> foundryvtt-gmScreen.js:81
#call foundry.js:632
callAll foundry.js:589
setupGame foundry.js:9098
_initializeGameView foundry.js:10432
_initializeView foundry.js:10408
initialize foundry.js:8995
initialize#0 libWrapper-wrapper.js:188
<anonymous> foundry.js:95974
async* foundry.js:95954
To Reproduce
- Install module
- Do some editing, whatever
- Restart Foundry
Expected behavior
That the module launches
Additional Information
The API 12 documentation does not mention the field .data anymore. But it seems to have the version - which the migration code tries to get - in a top level field now: https://foundryvtt.com/api/classes/foundry.packages.BaseModule.html#defineSchema
So maybe it would suffice to change migration.ts line 27:
if (isNewerVersion(getGame().modules.get(MODULE_ID)?.data.version ?? '0', NEEDS_MIGRATION_VERSION)) return;
to
if (isNewerVersion(getGame().modules.get(MODULE_ID)?.version ?? '0', NEEDS_MIGRATION_VERSION)) return;
Environment Details
Self Hosted
Describe the bug
Installation of the module and initial usage were fine. Until I restarted my Foundry to set some user rights. After that the module crashes with this error in the console:
To Reproduce
Expected behavior
That the module launches
Additional Information
The API 12 documentation does not mention the field .data anymore. But it seems to have the version - which the migration code tries to get - in a top level field now: https://foundryvtt.com/api/classes/foundry.packages.BaseModule.html#defineSchema
So maybe it would suffice to change
migration.ts line 27:to