1、项目中设置lang=“scss”,运行项目报错:

Cannot find module 'node-sass'

在这里插入图片描述
解决:安装sass

cnpm install node-sass --save-dev

2、仍报错:

* !!vue-style-loader!css-loader?{"sourceMap":true}!../../../node_modules/vue-loader/lib/style-compiler/index?{"vue":true,"id":"data-v-dcbcd43c","scoped":true,"hasInlineConfig":false}!sass-loader?{"sourceMap":true}!../../../node_modules/vue-loader/lib/selector?type=styles&index=0!./NewsList.vue in ./src/components/tabbar/NewsList.vue
To install it, you can run: npm install --save !!vue-style-loader!css-loader?{"sourceMap":true}!../../../node_modules/vue-loader/lib/style-compiler/index?{"vue":true,"id":"data-v-dcbcd43c","scoped":true,"hasInlineConfig":false}!sass-loader?{"sourceMap":true}!../../../node_modules/vue-loader/lib/selector?type=styles&index=0!./NewsList.vue

在这里插入图片描述
解决:

npm install sass sass-loader --save-dev
Logo

前往低代码交流专区

更多推荐