reactjssassnode-sass

Error: PostCSS received undefined instead of CSS string but Locally Doesnt


I had an error while building my react app test environment but in locally I build it successfully.

An error: Module build failed (from ./node_modules/css-loader/dist/cjs.js): Error: PostCSS received undefined instead of CSS string

In my local versions are; Node: 13.14.0, NPM: 6.14.4 Test environment versions are; Node: 12.22.12, NPM: 6.14.16

React:17.0.2


Solution

  • Probably it's related to this error https://www.drupal.org/project/bootstrap_sass/issues/3347384. As the comments says need to downgrade sass to sass@1.58.3