美文网首页
2018-11-29

2018-11-29

作者: Mylovesunshine | 来源:发表于2018-11-29 11:02 被阅读10次

    1.npm rebuild node-sass

    vue vue-style-loader !css-loader错误

    最近在学习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 install sass-loader --save;

    npm install node-sass --save;

    然后运行npm run start就可以

    2 scss 中
    /static/images/map-ret.jpg
    直接写static

    相关文章

      网友评论

          本文标题:2018-11-29

          本文链接:https://www.haomeiwen.com/subject/papxcqtx.html