bug PR-6.0-dev Pending

User tests: Successful: Unsuccessful:

avatar hans2103
hans2103
14 Aug 2025

Pull Request for no issue

Summary of Changes

We're clueless when working on a failed scss to css compilation.
This PR will adjust the error message thrown with a reference to the error and the file.

Testing Instructions

  • open build/media_source/com_media/scss/media-manager.scss and make a typo in @import "variables";
    • reason is to be sure that the scss to css will fail
    • I've changes variables to vacriables
  • run npm run build:css
    • compilation will fail
  • apply this patch
  • run npm run build:css
    • compilation will fail
  • compare the error messages before and after applying this patch.

Actual result BEFORE applying this Pull Request

file:///path/to/joomla/build/build-modules-js/stylesheets/handle-scss.mjs:19
    throw new Error(error.formatted);
          ^

Error
    at handleScssFile (file:///path/to/joomla/build/build-modules-js/stylesheets/handle-scss.mjs:19:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Expected result AFTER applying this Pull Request

node:internal/process/promises:391
    triggerUncaughtException(err, true /* fromPromise */);
    ^

Error: Error: Can't find stylesheet to import.
  ╷
2 │ @import "vacriables";
  │         ^^^^^^^^^^^^
  ╵
  ../../../../build/media_source/com_media/scss/media-manager.scss 2:9  root stylesheet
    at handleCompileResponse (/path/to/joomla/public_html/node_modules/sass-embedded/dist/lib/src/compiler/utils.js:155:15)
    at AsyncCompiler.compileRequestAsync (/path/to/joomla/node_modules/sass-embedded/dist/lib/src/compiler/async.js:100:54)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async compileAsync (/path/to/joomla/node_modules/sass-embedded/dist/lib/src/compile.js:36:16)
    at async handleScssFile (file:///path/to/joomla/build/build-modules-js/stylesheets/handle-scss.mjs:16:21)

With this error message I can find the failure easier then before.

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

avatar hans2103 hans2103 - open - 14 Aug 2025
avatar hans2103 hans2103 - change - 14 Aug 2025
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 14 Aug 2025
Category Repository Administration com_admin SQL
avatar richard67 richard67 - change - 14 Aug 2025
Labels Added: PR-6.0-dev
avatar joomla-cms-bot joomla-cms-bot - change - 14 Aug 2025
Category Repository Administration com_admin SQL JavaScript Repository
avatar hans2103 hans2103 - change - 21 Aug 2025
Labels Added: bug

Add a Comment

Login with GitHub to post a comment