装包报错:npm WARN gulp-postcss@9.0.1 requires a peer of postcss@^8.0.0 but none is installed. You must install peer dependencies yourself.

1 背景

  1.1 安装gulp-postcss失败

  npm install gulp-postcss -g
// 错误信息 npm WARN gulp-postcss@9.0.1 requires a peer of postcss@^8.0.0 but none is installed. You must install peer dependencies yourself.

2 问题

  2.1 装包报错 npm WARN gulp-postcss@9.0.1 requires a peer of postcss@^8.0.0 but none is installed. You must install peer dependencies yourself.

3 原因

  3.1 npm版本问题

4 解决办法

  4.1 先查看npm版本

npm -v

  4.2 升级npm版本

npm i -g npm@7

  4.3 重新安装gulp-postcss

posted @ 2022-05-07 16:42  不叫一日闲过  阅读(696)  评论(0编辑  收藏  举报