AutopReFixer:将颜色调整替换为打印色调。颜色调整速记目前已弃用
我安装了autoprefixer
,然后得到此警告:
npm install [email protected] --save-exact
警告./node_modules/bootstrap/dist/css/bootstrap.min.css
(./ node_modules/css-loader/dist/dist/cjs.js ?? ruleset [1] .rules [1] .Oneof [5] .Use [1]! 。 Bootstrap.min.css)
模块警告(来自./node_modules/postcss-loader/dist/cjs.js):
警告
autoprefixer:将颜色调整替换为打印色调。颜色调整速记目前已弃用。
编译
WebPack用1个警告
I installed autoprefixer
and I get this warning:
npm install [email protected] --save-exact
WARNING in ./node_modules/bootstrap/dist/css/bootstrap.min.css
(./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[5].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[5].use[2]!./node_modules/source-map-loader/dist/cjs.js!./node_modules/bootstrap/dist/css/bootstrap.min.css)
Module Warning (from ./node_modules/postcss-loader/dist/cjs.js):
Warning
autoprefixer: Replace color-adjust to print-color-adjust. The color-adjust shorthand is currently deprecated.
webpack compiled with 1 warning
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(13)
此问题是因为 autoprefixer v10.4.6 +
color-udjust
rebecrecation ,它被print> print> print> print-color-udjust 。它目前由 bootstrap v5.2.0-beta1 固定。因此,您可以更新 bootstrap 版本:
或者,只需覆盖 autoprefixer 插件和 downgrade it it it it /em>:
依赖项之后添加以下部分:{...}
运行命令
npm安装
,最后
npm start
This issue is because of Autoprefixer v10.4.6+
color-adjust
deprecation and it's replaced withprint-color-adjust
. It's currently fixed by Bootstrap v5.2.0-beta1. So you can update your Bootstrap version:Or, just override Autoprefixer plugin and downgrade it to previous version "10.4.5":
dependencies: {...}
Run the command
npm install
And finally
npm start
我遇到了这个错误,但与Bootstrap无关。与Next.js / tailwind CSS有关。
我遇到了这个错误:
作为 next.js tailwind安装,TailWind建议使用<<代码> POSTCSS 和
AutoPrefixer
。我已经更新了
PostCSS
和autoprefixer
npm软件包,但我仍然遇到此错误。为了修复它,我需要更新所有尾风插件。
这是如何升级尾管CSS插件整个尾风安装:
I came across this error but unrelated to Bootstrap. It was with Next.js / Tailwind CSS.
I was getting this error:
As part of the Next.js tailwind installation, tailwind suggests installing with
postcss
andautoprefixer
.I had updated the
postcss
andautoprefixer
npm packages, but I was still getting this error.To fix it I needed to update all of the tailwind plugins.
Here is an example of how to upgrade the tailwind css plugins, this is doing the whole tailwind installation:
Upgrade bootstrap to 5.2.0-beta1 by running the following command:
Source: https: //github.com/twbs/bootstrap/issues/36259#issuecomment-1143073964
Upgrade bootstrap to 5.2.0-beta1 by running the following command:
Source: https://github.com/twbs/bootstrap/issues/36259#issuecomment-1143073964
对于rush.js用户,您需要将它们添加到
common/config/config/rush/common-versions.json
:因为最新版本的
Postcss-preset-env
(react-scripts又需要:“ 5.0.0”
)需要“ autoprefixer”:“ 10.4.5”
For Rush.js users, you'll want to add these to your
common/config/rush/common-versions.json
:because the latest version of
postcss-preset-env
(which is in turn required byreact-scripts: "5.0.0"
) requires"autoprefixer": "10.4.5"
您可以做到这一点:
它对我有用。
You can do this:
It worked for me.
我认为这个错误是由于引导程序和尾风的存在。
我只是删除引导程序,并且错误消失了。
I think this error is because of the existence of both bootstrap and tailwind.
I just remove bootstrap, and the error disappears.
我的解决方案是下一个,但我使用的不是bootstrap,也许有人有我的问题:
My solution was the next but i use Tailwind not Bootstrap, maybe someone have my same issue:
npm install
npm install [email protected] worked for me
如果您不需要触摸软件包的解决方案。JSON或升级/降级自动FREFIXER,或删除Bootstrap,请按照以下步骤操作:
示例:
If you need a solution with no need to touch the package.json or upgrade/downgrade autoprefixer , or remove bootstrap follow the steps:
example :
转到
./ node_modules/bootstrap/dist/dist/css/bootstrap.min.css
,然后将color-udjust替换为print-color-udjust,然后在此处输入代码并在此处输入代码npm install 这对我有用
Go to
./node_modules/bootstrap/dist/css/bootstrap.min.css
and Replace color-adjust to print-color-adjust and enter code here and typenpm install [email protected] --save-exact
This worked for me转到\ node_modules \ bootstrap \ dist \ css \ bootstrap.css,通常在第2482行中,编辑
到
go to \node_modules\bootstrap\dist\css\bootstrap.css, usually in the line 2482, edit
to
在
package.json
中添加以下行:如果您使用的是 Yarn :
如果您正在使用 npm :
Add following line in
package.json
:If you're using yarn:
If you're using npm:
解决方案是使用命令安装Bootstrap 5.2 beta
The solution was to install bootstrap 5.2 beta using the command