Fixed the window ci problem#47680
Conversation
|
I have tested this item ✅ successfully on 3f33579 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47680. |
49856b7 to
5280843
Compare
|
what is the status with this pr. there are a lot of npm updates to do for 6.2 which I would have happily done but its not possible until this issue is resolved |
Unfortunately this PR alone doesn't solve the whole thing. There's another issue that needs to be solved even after applying this one. I have applied this pr on my local + |
|
Thanks for all your hard work! More to come i hope |
|
Doesn't work for me. Same error as in #47679 |
|
@brianteeman - indeed, it is another error Failed Task [plg_editors_codemirror::js] |
|
@chmst yes that was identified here but ignored. |
Fixes #47679
Summary of Changes
This PR fixes a Windows-specific issue in the Joomla build process where
npm install/ asset build fails due to invalid ESM import paths.On Windows, absolute file paths like:
were passed directly into dynamic
import()calls. Node.js ESM loader requires valid URLs (file://scheme), which caused the error:To resolve this:
All dynamic imports using file paths are converted using:
Paths are normalized using
path.resolve()Fixed JSON module import in TinyMCE builder
Updated Rollup config in Codemirror builder using
inlineDynamicImports: trueto avoid multi-chunk output errorsThis ensures the build works correctly on Windows systems.
Testing Instructions
6.2-devbranchActual result BEFORE applying this Pull Request
npm installfails during buildScreenshot (Before Fix)
Expected result AFTER applying this Pull Request
npm installcompletes successfullyScreenshot (After Fix)
Additional Context
While testing, it was observed that running:
may fail if required PHP extensions (gd, sodium, ldap and zip) are missing.
This is an environment setup issue and not related to this bug, but it may affect contributors during setup.
Link to documentations
Relevant references:
Joomla development docs:
https://developer.joomla.org/
Node.js ESM documentation (import specifiers):
https://nodejs.org/api/esm.html#urls
Rollup output configuration:
https://rollupjs.org/configuration-options/#output-inlineDynamicImports
No documentation changes for guide.joomla.org needed
No documentation changes for manual.joomla.org needed