in recent projects, SCSS has been directly used, and it is found that an error is reported. Up to now, I don’t know the cause, but I probably know that it is node, but the solution has been found. Let’s share:
1、 Error reporting
./src/components/alert_tip/alert_tip.scss (./node_modules/css-loader??ref--6-oneOf-5-1!./node_modules/postcss-loader/src??postcss!./node_modules/sass-loader/lib/loader.js!./src/components/alert_tip/alert_tip.scss)
Error: ENOENT: no such file or directory, scandir 'C:\Users\Administrator\Desktop\xxx\xxx\xxx\xxx\xxx-elm\node_modules\node-sass\vendor'
2、 Solution
just run the following code directly:
npm rebuild node-sass