You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running the server I would expect in the HTTP headers of http://localhost:3000/test a inbox link relation.
Instead, when running the example I get:
2024-02-08T14:41:58.179Z [AppRunner] {Primary} error: Could not start the server: Cannot read properties of undefined (reading 'identifier')
Could not start the server
TypeError: Cannot read properties of undefined (reading 'identifier')
at comparator (/Users/hochsten/github.com/SolidLabResearch/derived-resources-component/node_modules/@solid/community-server/dist/pods/generate/BaseResourcesGenerator.js:17:22)
at Array.sort (<anonymous>)
at BaseResourcesGenerator.processFolder (/Users/hochsten/github.com/SolidLabResearch/derived-resources-component/node_modules/@solid/community-server/dist/pods/generate/BaseResourcesGenerator.js:71:59)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async BaseResourcesGenerator.generate (/Users/hochsten/github.com/SolidLabResearch/derived-resources-component/node_modules/@solid/community-server/dist/pods/generate/BaseResourcesGenerator.js:58:9)
at async nextAsyncEntry (/Users/hochsten/github.com/SolidLabResearch/derived-resources-component/node_modules/@solid/community-server/dist/util/IterableUtil.js:101:20)
at async findNextSorted (/Users/hochsten/github.com/SolidLabResearch/derived-resources-component/node_modules/@solid/community-server/dist/util/IterableUtil.js:133:29)
at async sortedAsyncMerge (/Users/hochsten/github.com/SolidLabResearch/derived-resources-component/node_modules/@solid/community-server/dist/util/IterableUtil.js:156:22)
at async SubfolderResourcesGenerator.generate (/Users/hochsten/github.com/SolidLabResearch/derived-resources-component/node_modules/@solid/community-server/dist/pods/generate/SubfolderResourcesGenerator.js:37:26)
at async ContainerInitializer.handle (/Users/hochsten/github.com/SolidLabResearch/derived-resources-component/node_modules/@solid/community-server/dist/init/ContainerInitializer.js:31:67)
The text was updated successfully, but these errors were encountered:
Accessing metadata of derived resources defined in a parent container is indeed not possible. Metadata is stored together with its corresponding resource, and since the resource does not actually exist, storing the metadata does not work with the default methods. There are ways we could work around this to make it work, but would have to see how ugly those are.
Allowing this would raise some questions about how this is expected to work. Would this also need to be supported for templates with variables in them? What happens when the container metadata gets updated so that derived resource suddenly doesn't exist anymore?
Depending on your needs it actually is already is possible to edit the metadata of some derived resources. In the examples of the README there is a http://localhost:3000/dummy.txt derived resource, which has an actual resource with its own metadata behind it. For this derived resource you can modify the metadata so that might already solve your problem.
...except I just discovered that the metadata of that resource is not used yet to generate the headers for the derived resource so I will have to fix that.
...except I just discovered that the metadata of that resource is not used yet to generate the headers for the derived resource so I will have to fix that.
E.g. in the example given I would like to add a
test.meta
file with content:Running the server I would expect in the HTTP headers of
http://localhost:3000/test
ainbox
link relation.Instead, when running the example I get:
The text was updated successfully, but these errors were encountered: