Problems updating to v12
Hi guys, I am still working on the same system, using v11 (as that is the version I have installed due to some other games I am running) and starting from the boilerplate system builder using Data Models. My goal however has always been to get this system running on v12, so today I installed all my coding software on another machine along with the latest version of foundry and transferred over my project, only to find that I cannot even open it - base foundry does not even load. On examination of the console, I found the following error:
Uncaught (in promise) Error: A DataSchema must be an object with string keys and DataField values.
After fiddling around for a while, I found out the following: first, if I remove any of the files containing my Data Models, I can load base foundry, but none of the other Data Models load either; second, if I remove the line in the _module file that exports any of my Data Models, foundry also fails to load and I get the following error:
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'LOCALIZATION_PREFIXES')
Are these errors linked, what am I missing, and what can I do to get my module running in foundry v12?
3 Replies
Hard to help without any code 🤨
My instinct says it's likely an issue with your defineSchema methods, but yeah, having code to look at would help.
Thanks for the tip about defineSchema - the errors were only showing me locations in the foundry API, so I didn't know where the error was in my code. After checking through my schema I found that one didn't have a return value - I added that and now everything works!
I honestly have no idea why that wasn't picked up in v11.315