Meteor settings.json must be 1 line or it breaks!

Need to make use of the settings.json, but unless it’s all compressed on to one line, doesn’t work!

Anyone know why?

1 Like

What kind of error do you see? Maybe your json isn’t valid? Multiple lines should definitely not be an issue.

This is a known issue for builds on Windows and it’s a limitation in how Windows handles env vars

Not much Meteor can do about it unfortunately

Note: multi-line settings.json work fine in development on Windows, as long as it’s passed with the --settings settings.json flag

Naw it breaks even on my linux production version.

Although I have seen some issues with return characters… Maybe that’s what is happening.

Passing the data through a validator before using may help identify any problems with data (e.g, Sometimes copy and paste, specially from a rich-text tool/word processor, introduces some invalid chars which can make the json data invalid but hard to spot (like curly-quotes instead of plain-quotes for example).

1 Like

Good tip, I’ll run it through that next time.

On the other hand, writing 1 giant JSON line forces you to really get good at it lol…