천 줄 코딩도 한 삽질 부터

Node Sass version 5.0.0 is incompatible with ^4.0.0. 본문

JS/React.js

Node Sass version 5.0.0 is incompatible with ^4.0.0.

리준희 2021. 1. 8. 03:43

리액트에서 node-sass를 설치하고 scss 파일을 불러오면 아래와 같은 오류가 발생한다.

 

Node Sass version 5.0.0 is incompatible with ^4.0.0.

 

넌 누구냐? 새 삽질이냐?

 

역시 스택오버플로우 형님들은 답을 알고있었다..

 

stackoverflow.com/questions/64625050/error-node-sass-version-5-0-0-is-incompatible-with-4-0-0

 

Error: Node Sass version 5.0.0 is incompatible with ^4.0.0

I've created a blank React project, using the command: npx create-react-app on npm v7.0.7 and Node v15.0.1 Installed: React v17.0.1, node-sass v5.0.0, Then I tried to import blank .scss file to App

stackoverflow.com

 

해결방법은 호환되는 버전으로 재설치!

 

$npm uninstall node-sass

$npm install node-sass@4.14.1

 

npm 대신 yarn을 이용해도 된다.

 

$yarn uninstall node-sass

$yarn install node-sass@4.14.1

'JS > React.js' 카테고리의 다른 글

리액트 훅(React Hook) 정리  (0) 2021.01.17
Comments