In Node.js versions 22.0.0–22.10.x, the SCSS compilation into CSS using gulp-sass, gulp, or similar tools might fail with the following runtime error:
TypeError in plugin "sass" Message: Cannot assign to read only property 'ctime' of object '#<Stats>'
This error occurs because in Node.js 22.0.0 the internal properties of an fs.Stats object were made read-only, but Gulp tools take those properties as mutable. As a result, the build process crashes whenever a .scss file has been changed.
The issue does not affect Node.js versions earlier than 22.0.0 and has been officially resolved in Node.js 22.11.0.
To resolve the issue, upgrade Node.js to version 22.11.0 or later.
Alternatively, you can use Node.js 21.x or a Long-Term Support version, for example, version 20.x.