Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Gulp watch / gulp prod on a new project, gives this error:
TypeError: Class extends value undefined is not a constructor or null at Object.<anonymous> (…/node_modules/postcss-scss/lib/nested-declaration.js:3:33)
Steps to reproduce
run npm install, and then gulp watch or gulp prod
Comments
Comment #2
rembrandx CreditAttribution: rembrandx at Dropsolid commentedThe fix is to add the 'postcss' node module to devDependencies instead of leaving it in peerDependencies.
For good measure, updating the minor versions for all the postcss-releated modules as well.
Run:
npm install postcss@8.4.7 gulp-postcss@9.0.1 postcss-reporter@7.0.5 postcss-scss@4.0.3 --save-dev
If gulp still fails, throw out the node_modules folder and the package lock file, and run npm install again.
Comment #4
reszliI had the same issue and the solution proposed above solved it
Comment #5
rembrandx CreditAttribution: rembrandx at Dropsolid commented