Problem
When using --mashlib or --mashlib-cdn, .ttl files (like Settings/Preferences.ttl) are stored internally as JSON-LD but mashlib expects them to be served as Turtle format.
Without explicitly adding --conneg, the raw JSON-LD is served with a .ttl extension, causing mashlib to fail with parse errors:
Strange: Error parse_error trying to read your preference file.
Fetcher: Error trying to parse <http://localhost:3000/melvin/Settings/Preferences.ttl> as Notation3:
SyntaxError: Line 5: Bad syntax: expected '.' or '}' or ']' at end of statement
Expected behavior
When --mashlib or --mashlib-cdn is enabled, content negotiation should be automatically enabled so .ttl files are converted from JSON-LD to Turtle on the fly.
Proposed fix
In src/config.js or bin/jss.js, automatically set conneg: true when mashlib is enabled:
if (config.mashlib || config.mashlibCdn) {
config.conneg = true;
}
Workaround
Explicitly add --conneg when starting the server:
jss start --mashlib-cdn --idp --conneg
Problem
When using
--mashlibor--mashlib-cdn,.ttlfiles (likeSettings/Preferences.ttl) are stored internally as JSON-LD but mashlib expects them to be served as Turtle format.Without explicitly adding
--conneg, the raw JSON-LD is served with a.ttlextension, causing mashlib to fail with parse errors:Expected behavior
When
--mashlibor--mashlib-cdnis enabled, content negotiation should be automatically enabled so.ttlfiles are converted from JSON-LD to Turtle on the fly.Proposed fix
In
src/config.jsorbin/jss.js, automatically setconneg: truewhen mashlib is enabled:Workaround
Explicitly add
--connegwhen starting the server: