Because it needs to be used in the Vue2+element UI (not recommended to go to the Element UI official website) project <style lang="scss">
, I found that it will report an error every time, and it is quite messy to find some solutions on the Internet. The following is one of the problems I encountered. A solution:
Error in Chrome browser:
It just can't parse sass-loader .
So the first step needs to be introduced in the project:
npm install sass-loader -D
npm install node-sass -D
The first one was quickly introduced successfully:
but the second one made an error:
but I used it again cnpm install node-sass -D
and it was successful! ! ! (It's slag now, and I don't know why)
So the project can run successfully: