SXA Creative Exchange Live might not work correctly and fail to compile SCSS files to CSS when the Gulp watch task has been working for a long time.
The issue affects Gulp 3.x and earlier versions.
To resolve the issue, consider the following options:
- Upgrade Gulp to version 4.0.0 or later (recommended).
For example, to upgrade the Gulp version for a theme, proceed as follows:
- Create a backup of the theme.
- Perform the following commands in the terminal:
npm config set @sxa:registry=https://sitecore.myget.org/F/sc-npm-packages/npm/
npm i -g @sxa/CLI
- Delete the following folder from the theme:
[YOUR_THEME_FOLDER]\gulp
- Delete the following files:
[YOUR_THEME_FOLDER]\gulpfile.babel (not needed anymore)
[YOUR_THEME_FOLDER]\index.js (not needed anymore)
[YOUR_THEME_FOLDER]\package.json (will be recreated)
- Perform the following commands in the terminal:
sxa init
sxa config
- Configure your theme specifying the following settings:
- Sitecore instance url
- Sitecore theme name
- Sitecore theme path
- Transpile ES6+ javascript files down to ES2015
- Compile minified file
- Upload js source files
- Compile minified file
- Upload css source files
- Upload sass source files
- Perform the following commands in the terminal:
npm install
sxa watch All -d
Note: to get more information about SXA CLI, refer to Add a theme using SXA CLI.
- Restart the gulp all-watch task.
Note: sometimes it should be done several times.