So it looks like outputBasePath was run through path.resolve somewhere (turning / into \ on Windows) while path was not. Therefore, path.replace(outputBasePath, "") does nothing as the separators are different...
A fix would be to run the variable path through resolve to fix the separators.
Windows OS:
Expected Behavior
The templates are built.
Actual Behavior
The following error:
Additional Information
I investigated the problem and the problem is in this line: https://github.com/shellscape/jsx-email/blob/f77ece7dcc834db4699247a189e5ccbe091347c7/packages/jsx-email/src/cli/commands/build.ts#L105
The call
path.replace(outputBasePath, '')
uses the following variables with the content:path
:C:/Users/Thomas/AppData/Local/Temp/jsx-email/1715164607648/Welcome.js
outputBasePath
:C:\Users\Thomas\AppData\Local\Temp\jsx-email\1715164607648
So it looks like
outputBasePath
was run throughpath.resolve
somewhere (turning/
into\
on Windows) whilepath
was not. Therefore,path.replace(outputBasePath, "")
does nothing as the separators are different...A fix would be to run the variable
path
throughresolve
to fix the separators.