Issue with system json file

Hey there! I am trying to figure it out why is my system json file is screaming at me that is not parsing correctly. I hope that is a simple mistake on my part but I can't see it Link to the system.json file. Thank you!
GitHub
fvtt-dragons-den/public/system.json at main · lslavkov/fvtt-dragons...
A community contributed game system for Dragon's Den (Dračí Doupě) - lslavkov/fvtt-dragons-den
14 Replies
Eranziel
Eranziel4mo ago
What kind of error are you getting and where? Is Foundry complaining about it, your IDE, etc...?
LukeAbby
LukeAbby4mo ago
probably that media has an empty object in it
"media": [
{
}
],
"media": [
{
}
],
Bolts
Bolts4mo ago
IIRC, foundry won't load a module or system if it can't find the files specified in esmodules, but the vite config is still outputting to lancer.mjs
LukeAbby
LukeAbby4mo ago
Yeah that would probably be a possible error too I wonder where they got the Vite config haha
Eranziel
Eranziel4mo ago
Oh, grid.distance and grid.units probably causes errors too. You'll want to do this instead:
"grid": {
"distance": 1,
"units": "m"
}
"grid": {
"distance": 1,
"units": "m"
}
Bolts
Bolts4mo ago
I thought it was fine to use dot notation in the manifest?
Eranziel
Eranziel4mo ago
Not sure, maybe I don't think it's normally valid in JSON, is it? I wouldn't be too surprised if Foundry applied their usual dot-notation parser to it, though.
LukeAbby
LukeAbby4mo ago
it's 'valid' but it wouldn't automatically expand
Bolts
Bolts4mo ago
Okay then, yeah
LukeAbby
LukeAbby4mo ago
would still throw an error in Foundry if they don't expand it
fingerzz
fingerzz4mo ago
Thanks for checking guys Foundry is complaining Ok, I figure it out why is this causing For some reason vite build is not copying other stuff such as css file and mjs file in distribution folder Which is weird when checking the output
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 08-Jul-24 08:30 lang
d----- 08-Jul-24 08:30 templates
-a---- 08-Jul-24 08:30 43 dragons-den-2.js
-a---- 08-Jul-24 08:30 97 dragons-den-2.js.map
-a---- 08-Jul-24 08:05 1408 system.json
-a---- 08-Jul-24 00:32 0 template.json
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 08-Jul-24 08:30 lang
d----- 08-Jul-24 08:30 templates
-a---- 08-Jul-24 08:30 43 dragons-den-2.js
-a---- 08-Jul-24 08:30 97 dragons-den-2.js.map
-a---- 08-Jul-24 08:05 1408 system.json
-a---- 08-Jul-24 00:32 0 template.json
Since I am basically copying a lancer repo for my dev, would be better to ask there instead?
Bolts
Bolts4mo ago
It's not outputting a style.css because your scss file is completely empty. Put some rules in it and you'll get the output when you run the build. I don't know that the lancer build system is the best bet to start from tbh. It's quite old and has some technical debt and unreproduceable behaviors. Typhonjs has a template with a vite config and iirc the pf2e system also uses vite (but i can't vouch for whether it's suitable for a template). Case in point on unreproduceable stuff is the fact that more or less the same config is outputting a .js instead of .mjs entrypoint.
Eranziel
Eranziel4mo ago
You've got two of the Lancer devs in here already, I think here is better than the Lancer channel. 😉 I'll echo Bolts - I generally advise people to not use Lancer as an example for new projects. It's big and complex and has a fair amount of tech debt. That said, this is a forum for questions, so keep asking your questions.
fingerzz
fingerzz4mo ago
Which project is great as a template then?
Want results from more Discord servers?
Add your server