问题描述:

项目在本地运行不报错,上传到 GitHub 之后,再 clone 到本地,

npm install

安装完成之后再执行

npm run dev

这时报错 Error: No PostCSS Config found in...
本以为是 GitHub 上传的问题,后开又试了两回,发现问题依然存在,于是就开始网上寻找办法。

解决方案:

在项目根目录新建postcss.config.js文件,并对postcss进行配置:


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

好了,大功告成,试一试:

npm run dev

完美运行。

依然存在疑问:

项目在本地运行时本来不报错的,但是为什么上传到 GitHub 之后,再 clone 下来,再运行就得单独写一个 postcss.config.js 的文件并配置一下呢?

原文地址:https://segmentfault.com/a/1190000012587356

关于 Error: No PostCSS Config found in 的错误的更多相关文章

  1. Vue 项目启动抛出 Error/ No PostCSS Config found in

    项目启动时抛出 Error: No PostCSS Config found in … 的错误表示某个 css 文件不能被引入 解决办法: module.exports = { plugins: { ...

  2. Error: No PostCSS Config found in... 报错 踩坑记

    项目在本地运行不报错,上传到 GitHub 之后,再 clone 到本地,执行: npm install 安装完成之后再执行: npm run dev 这时报错 Error: No PostCSS C ...

  3. 【vue】项目编译报错 Error: No PostCSS Config found in...

    问题描述: 项目在本地运行不报错,上传到 GitHub 之后,再 clone 到本地,执行: npm install 安装完成之后再执行: npm run dev 这时报错 Error: No Pos ...

  4. Vue, element-ui Module build failed: Error: No PostCSS Config found

    使用vue框架写pc页面时,我们经常会用到element-ui这个框架. 当我们吧把需要的东西都装在好运行项目的时候,有时会出现这样的错误, Module build failed: Error: N ...

  5. vue Error: No PostCSS Config found in

    最近在做一个vue的移动端的项目,遇到一个问题,我本地的项目运行正常,可是上传到github上的一启动就报错,就是标题上的错误,找了很久,刚开始以为是某个css没有配置,就把本地的复制过去还是报错,无 ...

  6. npm run dev 启动错误:Module build failed: Error: No PostCSS Config found in:xxxxxxxxxxxxxx

    解决办法:在根目录新建postcss.config.js module.exports = { plugins: { 'autoprefixer': {browsers: 'last 5 versio ...

  7. 移动vue项目,启动错误:Module build failed: Error: No PostCSS Config found in:

    解决办法:在根目录新建postcss.config.js module.exports = { plugins: { 'autoprefixer': {browsers: 'last 5 versio ...

  8. Module build failed: Error: No PostCSS Config found

    使用vue框架写pc页面时,我们经常会用到element-ui这个框架. 当我们把需要的东西都装在好运行项目的时候,有时会出现这样的错误: 这是因为缺少了一个配置文件,postcss.config.j ...

  9. webstorm 打包angular Module build failed: Error: No PostCSS Config found

    angular创建项目后,在webstorm中启动时,报出如题错误,奇怪的是我从命令行启动(ng server)是没有问题的,多方寻求无果,在网上看到过说要加一个配置文件,我不信.我觉得是我配置哪里有 ...

随机推荐

  1. springboot中文文档

    http://blog.geekidentity.com/spring/spring_boot_translation/ https://blog.csdn.net/zfrong/article/de ...

  2. 用 Java 技术创建 RESTful Web (服务 JAX-RS:一种更为简单、可移植性更好的替代方式)

    作者: Dustin Amrhein, 软件工程师, IBM Nick Gallardo, 软件工程师, IBM 出处: http://www.ibm.com/developerworks/cn/we ...

  3. PHP内置SOAP扩展客户端的使用例子

    SOAP已经是属于OUT范畴的技术了,不过因为历史原因,时不时还是会用到它,以前都是用NuSOAP,现在准备试试PHP内置的SOAP扩展.由于文本只打算说说客户端的用法,所以得先找一些能直接用的服务端 ...

  4. HDU1061 - Rightmost Digit

    Given a positive integer N, you should output the most right digit of N^N. Input The input contains ...

  5. u-boot启动代码start.S详解360

    (1)定义入口.由于一个可执行的Image必须有一个入口点,并且只能有一个全局入口,通常这个入口放在ROM(Flash)的0x0地址,因此,必须通知编译器以使其知道这个入口,该工作可通过修改连接器脚本 ...

  6. pytorch 6 batch_train 批训练

    import torch import torch.utils.data as Data torch.manual_seed(1) # reproducible # BATCH_SIZE = 5 BA ...

  7. JavaScript中的常用的数组操作方法

    JavaScript中的常用的数组操作方法 一.concat() concat() 方法用于连接两个或多个数组.该方法不会改变现有的数组,仅会返回被连接数组的一个副本. var arr1 = [1,2 ...

  8. ORACLE-014:oracle中查看DBLinkpassword

    dblink在数据库中使用是比較多的,简单方便.只是随着oracle安全机制的加强.普通用户登录仅仅能看到,username以及连接字符串.那么dblinkpassword怎样查看呢? 非常easy. ...

  9. C. Amr and Chemistry(Codeforces Round #312 (Div. 2) 二进制+暴力)

    C. Amr and Chemistry time limit per test 1 second memory limit per test 256 megabytes input standard ...

  10. Springmvc Get请求Tomcat、WebLogic中文乱码问题

    Springmvc Get请求Tomcat.WebLogic中文乱码问题 学习了:http://www.cnblogs.com/qingdaofu/p/5633225.html http://www. ...