Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

项目构建报错:PostCSS plugin postcss-discard-comments requires PostCSS 8. #176

Open
WinfredWang opened this issue Feb 24, 2022 · 1 comment

Comments

@WinfredWang
Copy link

ERROR in css/common.7b13c1c5.css
css/common.7b13c1c5.css from Css Minimizer plugin
Error: PostCSS plugin postcss-discard-comments requires PostCSS 8.
Migration guide for end-users:
https://github.com/postcss/postcss/wiki/PostCSS-8-for-end-users
at Processor.normalize (D:\repo\egg-vue-webpack-boilerplate-master\packages\egg-vue-webpack-spa-boilerplate\node_modules\postcss\lib\processor.js:167:15)
at new Processor (D:\repo\egg-vue-webpack-boilerplate-master\packages\egg-vue-webpack-spa-boilerplate\node_modules\postcss\lib\processor.js:56:25)
at postcss (D:\repo\egg-vue-webpack-boilerplate-master\packages\egg-vue-webpack-spa-boilerplate\node_modules\postcss\lib\postcss.js:55:10)
at cssnanoPlugin (D:\repo\egg-vue-webpack-boilerplate-master\packages\egg-vue-webpack-spa-boilerplate\node_modules\cssnano\src\index.js:156:10)
at cssnanoMinify (eval at transform (D:\repo\egg-vue-webpack-boilerplate-master\packages\egg-vue-webpack-spa-boilerplate\node_modules\css-minimizer-webpack-plugin\dist\minify.js:79:28), :95:33)
at minify (D:\repo\egg-vue-webpack-boilerplate-master\packages\egg-vue-webpack-spa-boilerplate\node_modules\css-minimizer-webpack-plugin\dist\minify.js:37:32)
at Object.transform (D:\repo\egg-vue-webpack-boilerplate-master\packages\egg-vue-webpack-spa-boilerplate\node_modules\css-minimizer-webpack-plugin\dist\minify.js:80:10)
at execFunction (D:\repo\egg-vue-webpack-boilerplate-master\packages\egg-vue-webpack-spa-boilerplate\node_modules\jest-worker\build\workers\threadChild.js:148:17)
at execHelper (D:\repo\egg-vue-webpack-boilerplate-master\packages\egg-vue-webpack-spa-boilerplate\node_modules\jest-worker\build\workers\threadChild.js:127:5)
at execMethod (D:\repo\egg-vue-webpack-boilerplate-master\packages\egg-vue-webpack-spa-boilerplate\node_modules\jest-worker\build\workers\threadChild.js:131:5)

ERROR in css/spa.b80d562b.css
css/spa.b80d562b.css from Css Minimizer plugin
Error: PostCSS plugin postcss-discard-comments requires PostCSS 8.
Migration guide for end-users:
https://github.com/postcss/postcss/wiki/PostCSS-8-for-end-users
at Processor.normalize (D:\repo\egg-vue-webpack-boilerplate-master\packages\egg-vue-webpack-spa-boilerplate\node_modules\postcss\lib\processor.js:167:15)
at new Processor (D:\repo\egg-vue-webpack-boilerplate-master\packages\egg-vue-webpack-spa-boilerplate\node_modules\postcss\lib\processor.js:56:25)
at postcss (D:\repo\egg-vue-webpack-boilerplate-master\packages\egg-vue-webpack-spa-boilerplate\node_modules\postcss\lib\postcss.js:55:10)
at cssnanoPlugin (D:\repo\egg-vue-webpack-boilerplate-master\packages\egg-vue-webpack-spa-boilerplate\node_modules\cssnano\src\index.js:156:10)
at cssnanoMinify (eval at transform (D:\repo\egg-vue-webpack-boilerplate-master\packages\egg-vue-webpack-spa-boilerplate\node_modules\css-minimizer-webpack-plugin\dist\minify.js:79:28), :95:33)
at minify (D:\repo\egg-vue-webpack-boilerplate-master\packages\egg-vue-webpack-spa-boilerplate\node_modules\css-minimizer-webpack-plugin\dist\minify.js:37:32)
at Object.transform (D:\repo\egg-vue-webpack-boilerplate-master\packages\egg-vue-webpack-spa-boilerplate\node_modules\css-minimizer-webpack-plugin\dist\minify.js:80:10)
at execFunction (D:\repo\egg-vue-webpack-boilerplate-master\packages\egg-vue-webpack-spa-boilerplate\node_modules\jest-worker\build\workers\threadChild.js:148:17)
at execHelper (D:\repo\egg-vue-webpack-boilerplate-master\packages\egg-vue-webpack-spa-boilerplate\node_modules\jest-worker\build\workers\threadChild.js:127:5)
at execMethod (D:\repo\egg-vue-webpack-boilerplate-master\packages\egg-vue-webpack-spa-boilerplate\node_modules\jest-worker\build\workers\threadChild.js:131:5)

ERROR in css/spa.fbb750fd.css
css/spa.fbb750fd.css from Css Minimizer plugin
Error: PostCSS plugin postcss-discard-comments requires PostCSS 8.
Migration guide for end-users:
https://github.com/postcss/postcss/wiki/PostCSS-8-for-end-users
at Processor.normalize (D:\repo\egg-vue-webpack-boilerplate-master\packages\egg-vue-webpack-spa-boilerplate\node_modules\postcss\lib\processor.js:167:15)
at new Processor (D:\repo\egg-vue-webpack-boilerplate-master\packages\egg-vue-webpack-spa-boilerplate\node_modules\postcss\lib\processor.js:56:25)
at postcss (D:\repo\egg-vue-webpack-boilerplate-master\packages\egg-vue-webpack-spa-boilerplate\node_modules\postcss\lib\postcss.js:55:10)
at cssnanoPlugin (D:\repo\egg-vue-webpack-boilerplate-master\packages\egg-vue-webpack-spa-boilerplate\node_modules\cssnano\src\index.js:156:10)
at cssnanoMinify (eval at transform (D:\repo\egg-vue-webpack-boilerplate-master\packages\egg-vue-webpack-spa-boilerplate\node_modules\css-minimizer-webpack-plugin\dist\minify.js:79:28), :95:33)
at minify (D:\repo\egg-vue-webpack-boilerplate-master\packages\egg-vue-webpack-spa-boilerplate\node_modules\css-minimizer-webpack-plugin\dist\minify.js:37:32)
at Object.transform (D:\repo\egg-vue-webpack-boilerplate-master\packages\egg-vue-webpack-spa-boilerplate\node_modules\css-minimizer-webpack-plugin\dist\minify.js:80:10)
at execFunction (D:\repo\egg-vue-webpack-boilerplate-master\packages\egg-vue-webpack-spa-boilerplate\node_modules\jest-worker\build\workers\threadChild.js:148:17)
at execHelper (D:\repo\egg-vue-webpack-boilerplate-master\packages\egg-vue-webpack-spa-boilerplate\node_modules\jest-worker\build\workers\threadChild.js:127:5)
at execMethod (D:\repo\egg-vue-webpack-boilerplate-master\packages\egg-vue-webpack-spa-boilerplate\node_modules\jest-worker\build\workers\threadChild.js:131:5)

ERROR in css/common.386cbdf2.css
css/common.386cbdf2.css from Css Minimizer plugin
Error: PostCSS plugin postcss-discard-comments requires PostCSS 8.
Migration guide for end-users:
https://github.com/postcss/postcss/wiki/PostCSS-8-for-end-users
at Processor.normalize (D:\repo\egg-vue-webpack-boilerplate-master\packages\egg-vue-webpack-spa-boilerplate\node_modules\postcss\lib\processor.js:167:15)
at new Processor (D:\repo\egg-vue-webpack-boilerplate-master\packages\egg-vue-webpack-spa-boilerplate\node_modules\postcss\lib\processor.js:56:25)
at postcss (D:\repo\egg-vue-webpack-boilerplate-master\packages\egg-vue-webpack-spa-boilerplate\node_modules\postcss\lib\postcss.js:55:10)
at cssnanoPlugin (D:\repo\egg-vue-webpack-boilerplate-master\packages\egg-vue-webpack-spa-boilerplate\node_modules\cssnano\src\index.js:156:10)
at cssnanoMinify (eval at transform (D:\repo\egg-vue-webpack-boilerplate-master\packages\egg-vue-webpack-spa-boilerplate\node_modules\css-minimizer-webpack-plugin\dist\minify.js:79:28), :95:33)
at minify (D:\repo\egg-vue-webpack-boilerplate-master\packages\egg-vue-webpack-spa-boilerplate\node_modules\css-minimizer-webpack-plugin\dist\minify.js:37:32)
at Object.transform (D:\repo\egg-vue-webpack-boilerplate-master\packages\egg-vue-webpack-spa-boilerplate\node_modules\css-minimizer-webpack-plugin\dist\minify.js:80:10)
at execFunction (D:\repo\egg-vue-webpack-boilerplate-master\packages\egg-vue-webpack-spa-boilerplate\node_modules\jest-worker\build\workers\threadChild.js:148:17)
at execHelper (D:\repo\egg-vue-webpack-boilerplate-master\packages\egg-vue-webpack-spa-boilerplate\node_modules\jest-worker\build\workers\threadChild.js:127:5)
at execMethod (D:\repo\egg-vue-webpack-boilerplate-master\packages\egg-vue-webpack-spa-boilerplate\node_modules\jest-worker\build\workers\threadChild.js:131:5)

@nodous
Copy link

nodous commented Aug 3, 2022

这个百度能解决,node环境引起的,换一个低版本的14.xxxx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants