zoukankan      html  css  js  c++  java
  • 在vue中引入element-ui时报错

    报错

    ERROR  Failed to compile with 1 errors                                                                         14:28:54
    
    
    error  in ../node_modules/_element-ui@2.13.0@element-ui/lib/theme-chalk/index.css
    
    
    Module build failed: Error: No PostCSS Config found in: E:VueProjects
    ode_modules\_element-ui@2.13.0@element-uilib	heme-chalk
        at E:VueProjectsluffy
    ode_modulespostcss-load-configsrcindex.js:91:15
    
    
    @ ../node_modules/_element-ui@2.13.0@element-ui/lib/theme-chalk/index.css 4:14-168 13:3-17:5 14:22-176
    @ ./src/main.js
    @ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server ./src/main.js
    

      解决办法:

    在E:VueProjects ode_modules\_element-ui@2.13.0@element-uilib heme-chalk中新建postcss.config.js,写入以下代码:

    module.exports = {
        plugins: {
            'autoprefixer': {browsers: 'last 5 version'}
        }
    }
    

      再次npm run dev,就可以正常启动了

  • 相关阅读:
    java中JSON转换
    使用Admin监控
    linux安装tomcat
    SpringBoot整合Redis
    linux6.8安装docker
    使用Actuator监控
    SpringBoot集成阿里巴巴Druid监控
    使用Log4j日志处理
    SpringBoot多数据源
    SpringBoot文件上传下载
  • 原文地址:https://www.cnblogs.com/shannen/p/12503825.html
Copyright © 2011-2022 走看看