User tests: Successful: Unsuccessful:
Pull Request resolves #47679
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:
C:\Users\...
were passed directly into dynamic import() calls. Node.js ESM loader requires valid URLs (file:// scheme), which caused the error:
Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]
To resolve this:
All dynamic imports using file paths are converted using:
pathToFileURL(resolvedPath).hrefPaths are normalized using path.resolve()
Fixed JSON module import in TinyMCE builder
Updated Rollup config in Codemirror builder using inlineDynamicImports: true to avoid multi-chunk output errors
This ensures the build works correctly on Windows systems.
6.2-dev branchnpm install
npm install fails during buildError [ERR_UNSUPPORTED_ESM_URL_SCHEME]
RollupError: Invalid value for option "output.file"
npm install completes successfully
While testing, it was observed that running:
composer install
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.
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
| Status | New | ⇒ | Pending |
| Category | ⇒ | JavaScript Repository NPM Change |
I have tested this item ✅ successfully on 3f33579
This works.
| Labels |
Added:
NPM Resource Changed
PR-6.2-dev
|
||
I have tested this item ✅ successfully on 3f33579
This works.
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47680.