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

  • 相关阅读:
    一个很好用的linux下系统清理工具
    怎样将linux+qt在1S中内启动的幻灯片教程
    通过 ulimit 改善系统性能
    UBI文件系统
    利用BLCR加快Android的启动过程
    工作队列中的sleep导致控制台无法输入问题
    android system setup and building (3)
    物理地址和虚拟地址1 (MMU)
    对 makefile 中 eval 函数的学习体会
    location.href语句与火狐不兼容的问题
  • 原文地址:https://www.cnblogs.com/huashuke/p/13754398.html
Copyright © 2011-2022 走看看