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

autoprefixer: Replace color-adjust to print-color-adjust. #36259

Closed
3 tasks done
MatthiasPeltzer opened this issue May 2, 2022 · 71 comments · Fixed by #36283
Closed
3 tasks done

autoprefixer: Replace color-adjust to print-color-adjust. #36259

MatthiasPeltzer opened this issue May 2, 2022 · 71 comments · Fixed by #36283
Labels

Comments

@MatthiasPeltzer
Copy link

Prerequisites

Describe the issue

autoprefixer: Replace color-adjust to print-color-adjust. The color-adjust shorthand is currently deprecated.

_form_check.scss, line 28

color-adjust: exact; // Keep themed appearance for print

has to be

print-color-adjust: exact; // Keep themed appearance for print

in the future i think. it is depreceated.

Reduced test cases

no test link

What operating system(s) are you seeing the problem on?

Windows, macOS, iOS, Linux

What browser(s) are you seeing the problem on?

Chrome, Firefox

What version of Bootstrap are you using?

v5.1.3

@dkrnl
Copy link

dkrnl commented May 2, 2022

same issue. and with postcss-fail-on-warn message failed my build :(

fix: npm install [email protected] --save-exact

@NicoAdrian
Copy link

NicoAdrian commented May 2, 2022

Same issue here. Builds failing because of this.
The fixed proposed by @dkrnl didn't help me because I have react-scripts which depends on postcss-preset-env which depends on [email protected]

edit: fixed it by forcing the version of the peer dependency in my package.json:

"resolutions": {
    "autoprefixer": "10.4.5"
}

edit 2: resolutions is for yarn. for NPM, it's indeed overrides @gideonmulder

@Levdbas
Copy link

Levdbas commented May 2, 2022

I ran into the same issue for Bootstrap 4.6.1

@RafaelKis
Copy link

I'm experiencing the same issue:

Using laravel-mix v6.0.43 which depends on autoprefixer v10.4.7.

Bootstrap will compile, but produces a warning:

1 WARNING in child compilations (Use 'stats.children: true' resp. '--stats-children' for more details)

Once I update webpack.mix.js with the following, I'll get a bit more details:

mix.webpackConfig({ stats: { children: true } });

WARNING in ./resources/sass/app.scss (./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[5].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[5].use[2]!./node_modules/resolve-url-loader/index.js??ruleSet[1].rules[5].use[3]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[5].use[4]!./resources/sass/app.scss)
Module Warning (from ./node_modules/postcss-loader/dist/cjs.js):
Warning

(2603:3) autoprefixer: Replace color-adjust to print-color-adjust. The color-adjust shorthand is currently deprecated.

@alimartondi
Copy link

I encountered the same issue when I created a project with create react app.
Bootstrap version: v5.1.3

@gideonmulder
Copy link

The fixes proposed by @dkrnl and @NicoAdrian didn't help me

Fixed it by forcing the version of the peer dependency in my package.json, note: I use node 16.15.0

"overrides": {
    "autoprefixer": "10.4.5"
 }

@bensti22
Copy link

bensti22 commented May 3, 2022

"autoprefixer": "10.4.5" seem ignore the warning.

it is a temporary fix for me.
https://github.com/postcss/autoprefixer/blob/10.4.6/CHANGELOG.md

@jonathanfelicity
Copy link

All the above solution did not work for me :(.

@tpatalas
Copy link

tpatalas commented May 5, 2022

Deleting and reinstalling fixed the issue for me. Currently on autoprefixer 10.4.7

@RadhaGupta91
Copy link

Replace color-adjust to print-color-adjust. The color-adjust shorthand is currently deprecated.

Below solution didnt't work
add in package.json
"overrides": {
"autoprefixer": "10.4.7"
}
npm install

@mikebm
Copy link

mikebm commented May 5, 2022

You gotta use 10.4.5.

  "overrides": {
    "autoprefixer": "10.4.5"
  }

@RicLzPt
Copy link

RicLzPt commented May 5, 2022

npm install [email protected] --save-exact

This worked

@vineetdigit
Copy link

This most certainly didn't work for me.

npm install [email protected] --save-exact

But following helped remove the warning.

In the package.json of the top level directory of the react app, add the following section after the dependencies: {..}

"overrides": {
    "autoprefixer": "10.4.5"
  }
  • delete package-lock.json
  • \rm -rf node_modules
  • npm install
  • restart the react app with "react-scripts start"

The warning is no more. For more information about "dependencies", see following

https://www.stefanjudis.com/today-i-learned/how-to-override-your-dependencys-dependencies/

@Jrdelt
Copy link

Jrdelt commented May 6, 2022

This is always fun when React updates.

@mbrodala
Copy link
Contributor

mbrodala commented May 6, 2022

I'd suggest to move these things to a discussion since they do not really add value to the issue here. The issue is well-described and there's even a PR to fix it.

@frnangelim
Copy link

frnangelim commented May 6, 2022

I am receiving this error after forcing "autoprefixer" to 10.4.5 .
"Loading PostCSS "postcss-preset-env" plugin failed: Cannot find module 'fraction.js'"
Require stack:
16:03:13 - /sd/workspace/src/xxx/yyy/node_modules/postcss-preset-env/node_modules/autoprefixer/lib/resolution.js
...

@mdo
Copy link
Member

mdo commented May 7, 2022

Fixed in v5 by #36258. v5.2.0 should drop next week.

@achur00
Copy link

achur00 commented May 7, 2022

Have this issue using tail wind , I have Tried the above methods but non seem to work, getting stuck is always annoying

@achur00
Copy link

achur00 commented May 8, 2022

after setting the stats to true in webpack.mix.js, It was resolved by running the 'npm install [email protected] --save-exact" command and updating my tailwind form to '0.5.0'.... thanks

@thinkjrs
Copy link

thinkjrs commented May 8, 2022

Have this issue using tail wind , I have Tried the above methods but non seem to work, getting stuck is always annoying

As @achur00 mentions tailwindcss users can upgrade tailwindcss form plugin to 0.5.1 to squelch this error per tailwindlabs/tailwindcss#8277 (comment)

jimmyzhen added a commit to MoTrPAC/motrpac-frontend that referenced this issue May 9, 2022
@blancojuancruz
Copy link

npm install [email protected] that worked for me

@ojas-elawadhi
Copy link

I tried all the above fixes and none worked. But this did:

npm install [email protected]

After so much trouble this is working for me

@mehmetdemiray
Copy link

My solution for npm:

I addet overrides in package.json like this:

  "overrides": {
    "autoprefixer": "10.4.5"
  },

npm install [email protected] --save-exact

delete node_modules and package-lock.json

npm install

@mikiyasET
Copy link

This worked perfectly for me

npm install [email protected]

This worked for me too Thanks

@gass-git
Copy link

gass-git commented Jun 21, 2022

npm install [email protected]

Finally something that works!

iburakov added a commit to ryukzak/nitta that referenced this issue Jul 2, 2022
Resolving autoprefixer to 10.4.5 is needed to fix another
warning which got fixed in bootstrap 5.2.0-beta1, but they
seem to still have some problems.

Why 5.2.0 is needed:
twbs/bootstrap#36259

Why 5.2.0 doesn't work:
postcss-calc swears on calc($sass-variable * 2)
could not reproduce in other projects
may be related:
twbs/bootstrap#36446
iburakov added a commit to ryukzak/nitta that referenced this issue Jul 2, 2022
Resolving autoprefixer to 10.4.5 is needed to fix another
warning which got fixed in bootstrap 5.2.0-beta1, but this
produces new warnings, so falling back.

Why 5.2.0 is needed:
twbs/bootstrap#36259

Why 5.2.0 doesn't work:
postcss-calc swears on ($table-border-width * 2) in bootstrap codebase
could not reproduce in a minimal project to file an issue
may be related:
twbs/bootstrap#36446
@AdityaKakkar1402
Copy link

This most certainly didn't work for me.

npm install [email protected] --save-exact

But following helped remove the warning.

In the package.json of the top level directory of the react app, add the following section after the dependencies: {..}

"overrides": {
    "autoprefixer": "10.4.5"
  }
  • delete package-lock.json
  • \rm -rf node_modules
  • npm install
  • restart the react app with "react-scripts start"

The warning is no more. For more information about "dependencies", see following

https://www.stefanjudis.com/today-i-learned/how-to-override-your-dependencys-dependencies/

this works

@ntubrian
Copy link

all the practice mentioned above not work for me
me environment is using nvm for node 16.13.2
and dev deps:
"dependencies": {
"@testing-library/jest-dom": "^5.16.4",
"@testing-library/react": "^13.3.0",
"@testing-library/user-event": "^13.5.0",
"autoprefixer": "10.4.5",
"bootstrap": "^5.1.3",
"dayjs": "^1.11.3",
"react": "^18.2.0",
"react-bootstrap": "^2.4.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.3.0",
"react-scripts": "5.0.1",
"web-vitals": "^2.1.4"
},

@martinjoshevski
Copy link

This most certainly didn't work for me.

npm install [email protected] --save-exact

But following helped remove the warning.

In the package.json of the top level directory of the react app, add the following section after the dependencies: {..}

"overrides": {
    "autoprefixer": "10.4.5"
  }
  • delete package-lock.json
  • \rm -rf node_modules
  • npm install
  • restart the react app with "react-scripts start"

The warning is no more. For more information about "dependencies", see following

https://www.stefanjudis.com/today-i-learned/how-to-override-your-dependencys-dependencies/

This worked for me thanks

@Y3ssirski
Copy link

me too

@panlam0405
Copy link

same issue. and with postcss-fail-on-warn message failed my build :(

fix: npm install [email protected] --save-exact

This works for me!!

FdelMazo added a commit to BicisBA/BicisBA.github.io that referenced this issue Sep 17, 2022
NunoSempere added a commit to quantified-uncertainty/metaforecast that referenced this issue Oct 21, 2022
@jbstrap
Copy link

jbstrap commented Dec 13, 2022

This worked for me.

I added the following after dependencies

"overrides": {
    "autoprefixer": "10.4.5"
  }

then run the following command:
npm install

@mehmetyilmaz001
Copy link

This steps worked for me

1- Add the following lines to the packages.json

"overrides": {
    "autoprefixer": "10.4.5"
  }

2- Then run the command npm install

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.