zoukankan      html  css  js  c++  java
  • vue vue-style-loader !css-loader错误

    在执行npm run dev的时候 出现如下错误:

    问题1:

    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 dev。

    接着出现问题2:

    Module build failed: TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
    at validateString (internal/validators.js:117:11)
    at Object.join (path.js:375:7)

     @ ./node_modules/vue-style-loader!./node_modules/css-loader?{"sourceMap":true}!./node_modules/vue-loader/lib/style-compiler?{"vue":true,"id":"data-v-6b3aeb0e","scoped":false,"hasInlineConfig":false}!./node_modules/sass-loader/dist/cjs.js?{"sourceMap":true}!./node_modules/vue-loader/lib/selector.js?type=styles&index=0!./src/views/404.vue 4:14-369 13:3-17:5 14:22-377

    解决办法:

    sassloader版本过高导致的,回退7.×版本
    npm uninstall sass-loader(卸载当前版本)

    npm install sass-loader@7.3.1 --save-dev

  • 相关阅读:
    事件处理之跨浏览器
    IE事件处理
    DOM0级事件处理、DOM2级事件处理
    JS内置对象学习总结
    JS事件响应的学习总结
    vuex的学习例子
    npm run build 打包后,如何运行在本地查看效果(Apache服务)
    Vue.js 引入外部js方法
    Table展开行
    正则表达式test()和exec()、 search() 和 replace()用法实例
  • 原文地址:https://www.cnblogs.com/huashuke/p/13754398.html
Copyright © 2011-2022 走看看