๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
Lect & Tip/node, Angular, React

autoprefixer: Replace color-adjust to print-color-adjust. The color-adjust shorthand is currently deprecated. ๋œป ํ•ด๊ฒฐ ๋ฐฉ๋ฒ• /end value has mixed support, consider using flex-end instead / Node-sass incompatible with ^4.0.0

by ๋‚ฏ์„ ๊ณต๊ฐ„2019 2022. 10. 20.

๋ชฉ์ฐจ

    VSCODE์—…๋ฐ์ดํŠธ ์ดํ›„ ๊ฐ‘์ž๊ธฐ ์—๋Ÿฌ๊ฐ€ ๋œจ๊ธฐ ์‹œ์ž‘ํ–ˆ๋‹ค.

    ํ•˜์•„... ๋ญ์•ผ... ์•„ ๋ฌผ๋ก  ๋‚ด ์†Œ์Šค๋Š” ์•„๋‹ˆ๋‹ค. ๋‚œ ์ด๋ฏธ ํ•ด๊ฒฐ์„ ํ–ˆ์œผ๋ฏ€๋กœ...

    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.

    ์ œ๋ชฉ: VSCODE ์—…๋ฐ์ดํŠธ ์ดํ›„ ๋ฐœ์ƒํ•˜๋Š” ์—๋Ÿฌ๋“ค๊ณผ ํ•ด๊ฒฐ ๋ฐฉ๋ฒ•

    ๋ถ€์ œ: autoprefixer ๊ฒฝ๊ณ , flex ์†์„ฑ ์—๋Ÿฌ, Node-sass ๋ฒ„์ „ ํ˜ธํ™˜์„ฑ ์—๋Ÿฌ

    ์†Œ๊ฐœ

    VSCode ์—…๋ฐ์ดํŠธ ์ดํ›„ ๋งŽ์€ ์‚ฌ์šฉ์ž๋“ค์ด ๊ฐ‘์ž‘์Šค๋Ÿฝ๊ฒŒ ์—๋Ÿฌ ๋ฉ”์‹œ์ง€๋ฅผ ๋งˆ์ฃผํ•˜๊ฒŒ ๋˜์—ˆ์Šต๋‹ˆ๋‹ค. ์ด ํฌ์ŠคํŠธ์—์„œ๋Š” ์ฃผ๋กœ ๋ฐœ์ƒํ•˜๋Š” ์„ธ ๊ฐ€์ง€ ๋ฌธ์ œ์™€ ํ•ด๋‹น ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ•˜๋Š” ๋ฐฉ๋ฒ•์„ ๋‹ค๋ฃจ๊ฒ ์Šต๋‹ˆ๋‹ค. autoprefixer ๊ฒฝ๊ณ , flex ์†์„ฑ ์—๋Ÿฌ ๊ทธ๋ฆฌ๊ณ  Node-sass ๋ฒ„์ „ ํ˜ธํ™˜์„ฑ ์—๋Ÿฌ์— ๋Œ€ํ•ด ์•Œ์•„๋ด…์‹œ๋‹ค.

    1. Autoprefixer ๊ฒฝ๊ณ : "Replace color-adjust to print-color-adjust. The color-adjust shorthand is currently deprecated."

    ์ด ๋ฌธ์ œ๋Š” ๋ถ€ํŠธ์ŠคํŠธ๋žฉ๊ณผ autoprefixer ๊ฐ„์˜ ๋ฒ„์ „ ์ฐจ์ด๋กœ ์ธํ•ด ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค. ํ˜„์žฌ๋Š” ๋” ์ด์ƒ ์‚ฌ์šฉ๋˜์ง€ ์•Š๋Š” ๊ธฐ๋Šฅ์ด๊ธฐ ๋•Œ๋ฌธ์— ๊ฒฝ๊ณ ๊ฐ€ ํ‘œ์‹œ๋˜์ง€๋งŒ ์›นํŒฉ๊ณผ ๊ฐ™์€ ๋นŒ๋“œ ๋„๊ตฌ์—์„œ๋Š” ๊ฒฝ๊ณ ๋ฅผ ์—๋Ÿฌ๋กœ ์ฒ˜๋ฆฌํ•  ์ˆ˜๋„ ์žˆ์Šต๋‹ˆ๋‹ค.

    ํ•ด๊ฒฐ ๋ฐฉ๋ฒ•:
    autoprefixer๋ฅผ 10.4.5๋กœ ๋ฐ”๊ฟ”์ฃผ๊ฑฐ๋‚˜ ์ตœ์‹  ๋ฒ„์ „์„ ์„ค์น˜ํ•œ ๊ฒฝ์šฐ๋ผ๋ฉด 10.4.5๋ฅผ ์˜ค๋ฒ„๋ผ์ด๋“œํ•˜์—ฌ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.

    • yarn์„ ์‚ฌ์šฉํ•˜๋Š” ๊ฒฝ์šฐ:
      package.json ํŒŒ์ผ์— ๋‹ค์Œ๊ณผ ๊ฐ™์ด resolutions ์„น์…˜์„ ์ถ”๊ฐ€ํ•ฉ๋‹ˆ๋‹ค.๊ทธ๋ฆฌ๊ณ  yarn install ๋ช…๋ น์„ ์‹คํ–‰ํ•˜์—ฌ ์˜์กด์„ฑ์„ ๊ฐฑ์‹ ํ•ฉ๋‹ˆ๋‹ค.
    • "resolutions": { "autoprefixer": "10.4.5" }
    • npm์„ ์‚ฌ์šฉํ•˜๋Š” ๊ฒฝ์šฐ:
      package.json ํŒŒ์ผ์— ๋‹ค์Œ๊ณผ ๊ฐ™์ด overrides ์„น์…˜์„ ์ถ”๊ฐ€ํ•ฉ๋‹ˆ๋‹ค.๊ทธ๋ฆฌ๊ณ  npm install ๋ช…๋ น์„ ์‹คํ–‰ํ•˜์—ฌ ์˜์กด์„ฑ์„ ๊ฐฑ์‹ ํ•ฉ๋‹ˆ๋‹ค.
    • "overrides": { "autoprefixer": "10.4.5" }

    ์ดํ›„ ์•ฑ์„ ๋‹ค์‹œ ์‹คํ–‰ํ•˜์—ฌ ๊ฒฝ๊ณ ๊ฐ€ ์‚ฌ๋ผ์กŒ๋Š”์ง€ ํ™•์ธํ•ฉ๋‹ˆ๋‹ค.

    2. Flex ์†์„ฑ ์—๋Ÿฌ: "end value has mixed support, consider using flex-end instead"

    ์ด๋Ÿฌํ•œ ์—๋Ÿฌ๋Š” align-items๋‚˜ justify-content ์†์„ฑ์— end ๊ฐ’์„ ์‚ฌ์šฉํ•  ๋•Œ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค. ์ด๋Ÿฌํ•œ ์†์„ฑ์„ flex-end๋กœ ๋ณ€๊ฒฝํ•˜๋ฉด ์—๋Ÿฌ๊ฐ€ ํ•ด๊ฒฐ๋ฉ๋‹ˆ๋‹ค. ๋งˆ์ฐฌ๊ฐ€์ง€๋กœ start๋„ ๋™์ผํ•œ ๋ฌธ์ œ๋ฅผ ์ผ์œผํ‚ฌ ์ˆ˜ ์žˆ์œผ๋ฉฐ, ์ด ๊ฒฝ์šฐ์—๋Š” flex-start๋กœ ์ˆ˜์ •ํ•˜๋ฉด ๋ฉ๋‹ˆ๋‹ค.

    3. Node-sass ๋ฒ„์ „ ํ˜ธํ™˜์„ฑ ์—๋Ÿฌ: "Node Sass version 5.0.0 is incompatible with ^4.0.0"

    ์ด ๋ฌธ์ œ๋Š” Node-sass 5 ๋ฒ„์ „์ด Node 15์—์„œ๋งŒ ๋™์ž‘ํ•˜๊ธฐ ๋•Œ๋ฌธ์— ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค. Node ๋ฒ„์ „์ด ์ด๋ณด๋‹ค ํ•˜์œ„์ธ ๊ฒฝ์šฐ์— ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค.

    ํ•ด๊ฒฐ ๋ฐฉ๋ฒ•:
    ๊ตฌ๋ฒ„์ „์˜ Node๋ฅผ ์‚ฌ์šฉ ์ค‘์ด๋ผ๋ฉด Node-sass๋ฅผ 4.14.1๋กœ ๋‹ค์šด๊ทธ๋ ˆ์ด๋“œํ•ฉ๋‹ˆ๋‹ค.

    • Node-sass๋ฅผ ์ œ๊ฑฐํ•ฉ๋‹ˆ๋‹ค.
        npm uninstall node-sass
    • 4.14.1 ๋ฒ„์ „์˜ Node-sass๋ฅผ ์„ค์น˜ํ•ฉ๋‹ˆ๋‹ค.
        npm install node-sass@4.14.1

    ๊ฒฐ๋ก 

    VSCode ์—…๋ฐ์ดํŠธ ์ดํ›„ ๋ฐœ์ƒํ•˜๋Š” ์—๋Ÿฌ๋“ค์€ ์–ด๋– ํ•œ ์›์ธ์œผ๋กœ ์ธํ•ด ๋ฐœ์ƒํ•˜๋Š” ๊ฒฝ์šฐ๊ฐ€ ๋งŽ์Šต๋‹ˆ๋‹ค. ์ด๋ฒˆ ํฌ์ŠคํŠธ์—์„œ๋Š” autoprefixer ๊ฒฝ๊ณ , flex ์†์„ฑ ์—๋Ÿฌ, ๊ทธ๋ฆฌ๊ณ  Node-sass ๋ฒ„์ „ ํ˜ธํ™˜์„ฑ ์—๋Ÿฌ๋ฅผ ๋‹ค๋ฃจ์—ˆ๊ณ , ๊ฐ ๋ฌธ์ œ๋“ค์— ๋Œ€ํ•œ ํ•ด๊ฒฐ ๋ฐฉ๋ฒ•์„ ์ œ์‹œํ–ˆ์Šต๋‹ˆ๋‹ค. ๋” ๋‚˜์€ ๊ฐœ๋ฐœ ๊ฒฝํ—˜์„ ์œ„ํ•ด ์—๋Ÿฌ ํ•ด๊ฒฐ์— ์ฃผ์˜ํ•˜์‹œ๊ธฐ ๋ฐ”๋ž๋‹ˆ๋‹ค. ์ด์ œ ์—๋Ÿฌ ๋ฉ”์‹œ์ง€๋ฅผ ๋งˆ์ฃผํ–ˆ์„ ๋•Œ ๋‘๋ ค์›Œํ•˜์ง€ ์•Š๊ณ  ์ž์‹ ๊ฐ์„ ๊ฐ€์ง€๊ณ  ํ•ด๊ฒฐํ•  ์ˆ˜ ์žˆ์„ ๊ฒƒ์ž…๋‹ˆ๋‹ค.

    ๋ฐ˜์‘ํ˜•

    ๋Œ“๊ธ€