vue项目启动报错Module build failed: Error: No PostCSS Config found in:


 最近在做项目的时候, 需要把同事的项目拷贝到我的电脑上来。在安装好vue-li框架之后,

重启提示报错   Module build failed: Error: No PostCSS Config found in: D:\spacework\wxadmins\node_modules\_element-ui@2.13.0@element-ui\lib\theme-chalk     at config.search.then

postcss/postcss-loader: PostCSS loader for webpack

官网说是要有postcss.config.js的

 

解决办法:在根目录新建postcss.config.js

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

 

 

找了很多资料都没有说是因为什么,

还有另一种解决办法就是

在拷贝项目的时候,除了不要node-module文件夹,其他的隐藏文件,比如.开头的文件都要复制粘贴过来,重新安装vue-cli,启动就可以了。

以上就是我对重启vue-cli启动报错Module build failed: Error: No PostCSS Config found in:的理解。


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM