User tests: Successful: Unsuccessful:
Fixes #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
|
||
| Labels |
Added:
bug
|
||
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
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 + inlineDynamicImports line (temporarily) today just to be able to run npm ci
| Status | Pending | ⇒ | Fixed in Code Base |
| Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2026-05-06 17:48:23 |
| Closed_By | ⇒ | MacJoom |
Thanks for all your hard work!
Thanks for all your hard work! More to come i hope
@brianteeman - indeed, it is another error
Failed Task [plg_editors_codemirror::js]
Trace: Error: Processing failed for "D:\laragon\www\joomla-62dev\media_source\plg_editors_codemirror\js\codemirror.es6.js".
at file:///D:/laragon/www/joomla-62dev/build/build-modules-js/javascript/js-handle.mjs:157:11
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async Promise.all (index 0)
at async CodemirrorModuleBuilder.js (file:///D:/laragon/www/joomla-62dev/media_source/plg_editors_codemirror/builder.mjs:119:5)
at async Promise.all (index 44) {
[cause]: Error [RollupError]: Invalid value for option "output.file" - when building multiple chunks, the "output.dir" option must be used, not "output.file". To inline dynamic imports, set the "inlineDynamicImports" option.
at getRollupError (file:///D:/laragon/www/joomla-62dev/node_modules/rollup/dist/es/shared/parseAst.js:402:41)
at error (file:///D:/laragon/www/joomla-62dev/node_modules/rollup/dist/es/shared/parseAst.js:398:42)
at validateOptionsForMultiChunkOutput (file:///D:/laragon/www/joomla-62dev/node_modules/rollup/dist/es/shared/node-entry.js:20756:16)
at Bundle.generate (file:///D:/laragon/www/joomla-62dev/node_modules/rollup/dist/es/shared/node-entry.js:20609:17)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async file:///D:/laragon/www/joomla-62dev/node_modules/rollup/dist/es/shared/node-entry.js:23558:27
at async catchUnfinishedHookActions (file:///D:/laragon/www/joomla-62dev/node_modules/rollup/dist/es/shared/node-entry.js:22925:16)
at async Promise.all (index 0)
at async CodemirrorModuleBuilder.js (file:///D:/laragon/www/joomla-62dev/media_source/plg_editors_codemirror/builder.mjs:119:5)
at async Promise.all (index 44) {
code: 'INVALID_OPTION',
url: 'https://rollupjs.org/configuration-options/#output-dir'
}
}
at file:///D:/laragon/www/joomla-62dev/build/build-modules-js/builder/builder-factory.mjs:74:21
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async Promise.all (index 44)
Processing failed for "D:\laragon\www\joomla-62dev\media_source\plg_editors_codemirror\js\codemirror.es6.js".
npm error code 1
npm error path D:\laragon\www\joomla-62dev
npm error command failed
npm error command C:\WINDOWS\system32\cmd.exe /d /s /c node --env-file=./build/production.env build/build.mjs build -a
npm error A complete log of this run can be found in: C:\Users\konta\AppData\Local\npm-cache_logs\2026-05-11T07_47_57_768Z-debug-0.log
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.