Error: PostCSS received undefined instead of CSS string

created at 11-27-2021 views: 563

problem

I changed a computer, and when I started npm run serve, the error was reported as follows:

Error: PostCSS received undefined instead of CSS string

reason

The node version is incompatible with sass

solution

1. Uninstall sass first

npm uninstall node-sass

2. Install sass again

npm install node-sass --save-dev
npm install sass-loader --save-dev

3. Success

npm run serve
created at:11-27-2021
edited at: 06-04-2022: