NPM Resource Changed PR-6.2-dev Pending

User tests: Successful: Unsuccessful:

avatar pratibha-builds
pratibha-builds
24 Apr 2026

Pull Request resolves #47679

  • I read the Generative AI policy and my contribution is compatible with the policy and GNU/GPL 2 or later.

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:

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).href
  • Paths 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.


Testing Instructions

  1. Clone Joomla repository on Windows
  2. Switch to 6.2-dev branch
  3. Run:
npm install

Actual result BEFORE applying this Pull Request

  • npm install fails during build
  • Error:
Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]
  • In some cases:
RollupError: Invalid value for option "output.file"

Screenshot (Before Fix)

cli_error_fix

Expected result AFTER applying this Pull Request

  • npm install completes successfully
  • All build steps execute without errors
  • Joomla assets are generated correctly

Screenshot (After Fix)

image

Additional Context

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.


Link to documentations

Relevant references:

avatar pratibha-builds pratibha-builds - open - 24 Apr 2026
avatar pratibha-builds pratibha-builds - change - 24 Apr 2026
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 24 Apr 2026
Category JavaScript Repository NPM Change
avatar CSGoat0 CSGoat0 - test_item - 24 Apr 2026 - Tested successfully
avatar CSGoat0
CSGoat0 - comment - 24 Apr 2026

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.

avatar CSGoat0
CSGoat0 - comment - 24 Apr 2026

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.

avatar pratibha-builds pratibha-builds - change - 25 Apr 2026
Labels Added: NPM Resource Changed PR-6.2-dev

Add a Comment

Login with GitHub to post a comment