Open cbonami opened 2 years ago
I debugged it.
It's due to forward vs backward slash problem :/
In the map pumlLinks you have a key: 'C:/javadev/workspace/ce-calendar-timespend-backend/structurizr/src/main/java/be/acerta/ce/calendar/docs/puml/aggregate-timespendlapse.puml':
[
[
'C:/javadev/workspace/ce-calendar-timespend-backend/structurizr/src/main/java/be/acerta/ce/calendar/docs/aggregate-timespendlapse.puml',
{
encodedData: 'SoWkIImgAStDuULApaaiBbO8BKujKgZcvL9Gq0qkAShCIrV8J47cvINcfeBusaXy3KrUhbfUBh1McnfTNONWWjJapBJCP908BvT3QbuAq0O0',
url: 'https://tinyurl.com/2atnl4pe',
....
But the pumlPath that is resolved is 'C:\javadev\workspace\ce-calendar-timespend-backend\structurizr\src\main\java\be\acerta\ce\calendar\docs\aggregate-timespendlapse.puml'
This has backward slashes on Windows !!
So pumlPath is never found in pumlLinks.
So this fixes it: at line 168 in index.js:
const pumlPath = path.resolve(path.dirname(mdPath), mdPumlLinkPath).replaceAll('\\','/')
I believe it is more than that. Seems it works on Linux, but not on Windows.
It looks for a path with forward slashes like: D:/repos/fhi/lmr/Fhi.Legemiddelregisteret.wiki/Testing/miljoer.md
But crashes when trying to get it using backwards slashes.
D:\repos\fhi\lmr\Fhi.Legemiddelregisteret.wiki\Testing\miljoer.puml
No way of trying to change the slashes back or forward helps.
@OsirisTerje @cbonami unfortunately I don't have a windows machine to test this on, if you find a fix, would you mind opening a PR?
I debugged it.
It's due to forward vs backward slash problem :/
In the map pumlLinks you have a key: 'C:/javadev/workspace/ce-calendar-timespend-backend/structurizr/src/main/java/be/acerta/ce/calendar/docs/puml/aggregate-timespendlapse.puml':
[ [ 'C:/javadev/workspace/ce-calendar-timespend-backend/structurizr/src/main/java/be/acerta/ce/calendar/docs/aggregate-timespendlapse.puml', { encodedData: 'SoWkIImgAStDuULApaaiBbO8BKujKgZcvL9Gq0qkAShCIrV8J47cvINcfeBusaXy3KrUhbfUBh1McnfTNONWWjJapBJCP908BvT3QbuAq0O0', url: 'https://tinyurl.com/2atnl4pe', ....
But the pumlPath that is resolved is 'C:\javadev\workspace\ce-calendar-timespend-backend\structurizr\src\main\java\be\acerta\ce\calendar\docs\aggregate-timespendlapse.puml'
This has backward slashes on Windows !!
So pumlPath is never found in pumlLinks.
So this fixes it: at line 168 in index.js:
const pumlPath = path.resolve(path.dirname(mdPath), mdPumlLinkPath).replaceAll('\\','/')
I made this change but still getting error.
@scmay can you provide us with the full logs?
yes originally wanted to send via Twitter DM (I cannot post publicly, contains sensitive info) but realised I couldn't send a private DM. I went down another solution route so I've lost the logs.
On Thu, Sep 1, 2022 at 2:07 AM Daniel @.***> wrote:
@scmay https://github.com/scmay can you provide us with the full logs?
— Reply to this email directly, view it on GitHub https://github.com/danielyaa5/puml-for-markdown/issues/6#issuecomment-1233136574, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFJNMIKIV3CS3VHS4JXR33DV357KRANCNFSM542DCOOA . You are receiving this because you were mentioned.Message ID: @.***>
I get this error:
But the puml file is there, it's in the path C:\javadev\workspace\ce-calendar-timespend-backend\structurizr\src\main\java\be\acerta\ce\calendar\docs\puml\a.puml.
The .../docs folder contains the file 01-context.md:
The .../docs/puml folder contains the file a.puml:
Plz note that I am on Windows. Placing the file in the same folder than the md file doesn't help. It doesn't find the puml-file while it is right there where it expects it !
I think it is the same issue than https://github.com/danielyaa5/puml-for-markdown/issues/5 but the error msg is a bit different.