adobe / aem-guides-wknd

Tutorial Code companion for Getting Started Developing with AEM Sites WKND Tutorial
https://experienceleague.adobe.com/docs/experience-manager-learn/getting-started-wknd-tutorial-develop/overview.html
MIT License
279 stars 531 forks source link

Issue when building while following steps in Experience League Tutorial #453

Open dymori opened 2 months ago

dymori commented 2 months ago

In the client-side-libraries section for learning AEM, there is a section that asks the user to overwrite the scss files downloaded through git with wknd-base-styles-src-v3.zip. Once this is overwritten, npm run watch will report a failed build, and mvn clean install also reports a failed build.

The fix is to add @use 'sass:math'; to aem-guides-wknd/ui.frontend/src/main/webpack/components/_image.scss which resolves the error.

Expected Behaviour

The sass files provided in the zip should build correctly.

Actual Behaviour

Overwriting the original files with the files provided in the zip in the tutorial will cause a build error.

Reproduce Scenario (including but not limited to)

Steps to Reproduce

  1. Start off on a clean branch of tutorial/client-side-libraries-start
  2. Download wknd-base-styles-src-v3.zip, and overwrite the src folder in ui.frontend]
  3. mvn clean install or npm run watch

Platform and Version

macOS AEM SDK (May 06)

Sample Code that illustrates the problem

Logs taken while reproducing problem

[INFO] Error: Module build failed (from ./node_modules/sass-loader/dist/cjs.js): [INFO] SassError: There is no module with the namespace "math". [INFO] ╷ [INFO] 23 │ margin-top: math.div($gutter-padding, 2); [INFO] │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] ╵ [INFO] src/main/webpack/components/_image.scss 23:21 @import [INFO] src/main/webpack/site/main.scss 5:1662 root stylesheet