DEBUGGING WITH SUPERJCYBS - Bootstrap Error With Reactjs
Are you faced with this error? Warning (6:29521) autoprefixer: Replace color-adjust to print-color-adjust. The color-adjust shorthand is currently deprecated. Search for the keywords to learn more about each warning. To ignore, add // eslint-disable-next-line to the line before. 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):
with this error, there has been lots of solutions, i will put those below then add my version...
1) You can add it into package.json
* FOR YARN USERS
"resolutions": { "autoprefixer": "10.4.5" },Then run yarn install
* FOR NPM USERS
"overrides": { "autoprefixer": "10.4.5" },Then npm install
2) Simply setting overrides didn't work for me. I had do go through the following steps :
Add this to package.json:
"overrides": { "autoprefixer": "10.4.5" }Delete package-lock.json
Delete the node_modules/ directory
Run npm install to install the npm modules back
3) MY SOLUTION: I went into bootstrap/dist/css/bootstrap.min.css file inde node modules
use find to locate that line.
Replace color-adjust to print-color-adjust. The color-adjust shorthand is currently deprecated.
4) run npm i bootstrap@5.2.0-beta1
Leave a Comment