Closed joachimvh closed 1 year ago
I don't have an immediate idea what could be causing this.
The lsd:module: true
logic might be producing things that are not Windows-safe (which would explain why you're not running into it in CSS).
This might also be a potential clue to this issue: https://github.com/LinkedSoftwareDependencies/Components.js/issues/111#issuecomment-1368811736
When using "lsd:module": true
, where are the generated components files expected to appear? In the lib folder next to the TS files, or in the components/config folder? I would assume not the lib folder as that is not one of the generated import paths but that is what it seems to be trying to do.
Found it, the issue is this line: https://github.com/LinkedSoftwareDependencies/Components-Generator.js/blob/d58bfa24097617ca75e066f027b91589b91f5e4b/lib/serialize/ComponentConstructor.ts#L156
So same thing, some path normalization is required.
Ah nice, good catch!
I'm assuming this is a Windows problem as it occurred trying to build Comunica. But I have no idea what is causing this or why so I'm just describing the situation as I don't know where to look further, so the title might also be wrong.
When building Comunica, and first fixing https://github.com/LinkedSoftwareDependencies/Components-Generator.js/issues/114, I get the following error:
This error is thrown if the following loop does not find a result: https://github.com/LinkedSoftwareDependencies/Components-Generator.js/blob/d58bfa24097617ca75e066f027b91589b91f5e4b/lib/serialize/ComponentConstructor.ts#L167-L171
The reason it doesn't find a result is because in this case the
sourcePath
islib/ActorAbstractMediaTyped.jsonld
, but the values forpath
arecomponents/
andconfig/
, which are the default values that are used when thepackage.json
does not define any import paths and only has'lsd:module': true
.So I have no idea how this function is supposed to succeed. Does this mean the
sourcePath
value is wrong or are there supposed to be other import paths? ThesourcePath
is created here: https://github.com/LinkedSoftwareDependencies/Components-Generator.js/blob/d58bfa24097617ca75e066f027b91589b91f5e4b/lib/serialize/ComponentConstructor.ts#L121-L123 If it is wrong, that might mean thethis.pathDestination
object is wrong, which has the following values:or the
absolutePath
, which is'C:\\projects\\comunica\\comunica\\packages\\actor-abstract-mediatyped\\lib\\ActorAbstractMediaTyped'
.I tried a quick fix of making sure all paths in this process only have forward slashes but that didn't seem to fix it so I have no idea what is wrong here, as it all depends on what values are expected in the above functions.