vue+webpack安装sass过程中遇到权限不够,直接删除node_modus文件夹重新安装,node_modus先取得管理员权限才能删

时间:2022-10-08 17:22:48

最近在学习vue框架,使用webpack打包vue项目,在执行npm run start的时候 出现如下错误:

This dependency was not found:

* !!vue-style-loader!css-loader?{"minimize":false,"sourceMap":false}!../../node_modules/vue-loader/lib/style-compiler/index?{"vue":true,"id":"data-v-1d57e5ea","scoped":false,"hasInlineConfig":false}!stylus-loader?{"sourceMap":false}!../../node_modules/vue-loader/lib/selector?type=styles&index=0!./a.vue in ./src/components/a.vue

To install it, you can run: npm install --save !!vue-style-loader!css-loader?{"minimize":false,"sourceMap":false}!../../node_modules/vue-loader/lib/style-compiler/index?{"vue":true,"id":"data-v-1d57e5ea","scoped":false,"hasInlineConfig":false}!stylus-loader?{"sourceMap":false}!../../node_modules/vue-loader/lib/selector?type=styles&index=0!./a.vu

解决思路:

npm intall sass-loader --save;

npm install node-sass --save;

然后运行npm run start就可以

对生活:随心随性; 对工作:一丝不苟; 对学习:认真踏实; 对亲人:关心爱护; 愿每个人都在成长,得到属于自己的幸福!!!