Vue Loading PostCSS Plugin failed: Cannot find module ‘autoprefixer‘ 问题

Vue Loading PostCSS Plugin failed: Cannot find module 'autoprefixer' 问题

vue运行时,提示Vue Loading PostCSS Plugin failed: Cannot find module 'autoprefixer' 。

问题原因:未安装postcss-loader autoprefixer。执行以下命令:

复制代码
cnpm install postcss-loader autoprefixer postcss  -D

执行成功,如果运行时还报以下错误:

PostCSS plugin autoprefixer requires PostCSS 8

说明PostCSS 版本不对,需要指定版本执行,执行以下脚本:

复制代码
cnpm install postcss-loader [email protected] postcss  -D

执行成功,重新运行正常。

相关推荐
帅帅哥的兜兜12 分钟前
next.js实现项目搭建
前端·react.js·next.js
筱歌儿17 分钟前
css 左右布局
前端·css
GISer_Jing42 分钟前
编译原理AST&以Babel为例进行解读、Webpack中自定义loader与plugin
前端·webpack·node.js
GISer_Jing43 分钟前
Webpack中Compiler详解以及自定义loader和plugin详解
前端·webpack·node.js
浩~~1 小时前
CSS常用选择器
前端·css
于慨1 小时前
uniapp+vite+cli模板引入tailwindcss
前端·uni-app
yunvwugua__1 小时前
Python训练营打卡 Day26
前端·javascript·python
满怀10151 小时前
【Django全栈开发实战】从零构建企业级Web应用
前端·python·django·orm·web开发·前后端分离
Darling02zjh2 小时前
GUI图形化演示
前端
Channing Lewis2 小时前
如何判断一个网站后端是用什么语言写的
前端·数据库·python