rdf-connect / LDES-Solid-Server

An implementation of an LDES server built within the Community Solid Server
4 stars 1 forks source link

The default config gives an error: Invalid predicate IRI: freshDuration #21

Open woutslabbinck opened 3 months ago

woutslabbinck commented 3 months ago

If you start the server with the default config:

npm i @solid/community-server ldes-solid-server
wget https://github.com/rdf-connect/LDES-Solid-Server/blob/master/server/examples/config-ldes.json

npx @solid/community-server -c config-ldes.json

The following error is given:

2024-05-16T12:28:00.457Z [Components.js] info: Discovered 169 component packages within 531 packages
2024-05-16T12:28:00.459Z [Components.js] info: Initiating component loading
2024-05-16T12:28:04.261Z [Components.js] info: Registered 907 components
2024-05-16T12:28:04.262Z [Components.js] info: Loaded configs
Could not build the config files from ...config-ldes.json
Error: Error while parsing file "/...config-ldes.json": Invalid predicate IRI: freshDuration

The reason is that in the view in the config, freshDuration is an argument to the constructor: https://github.com/rdf-connect/LDES-Solid-Server/blob/ac4ad7ceb92278e114ed3dabc1d7d0921792f84d/server/examples/config-ldes.json#L90

But in the SDS Mongo View, this is not the case: https://github.com/rdf-connect/LDES-Solid-Server/blob/ac4ad7ceb92278e114ed3dabc1d7d0921792f84d/src/mongoDB/MongoSDS.ts#L32-L37

It is however part of the constructor of the LDESStore (though it has a default, so it is not mandatory): https://github.com/rdf-connect/LDES-Solid-Server/blob/ac4ad7ceb92278e114ed3dabc1d7d0921792f84d/src/LDESStore.ts#L58-L65