ImFe's study

[Sass] Node Sass version 6.0.1 is incompatible with ^4.0.0|| ^5.0.0. 해결 본문

WEB/React

[Sass] Node Sass version 6.0.1 is incompatible with ^4.0.0|| ^5.0.0. 해결

ImFe 2021. 6. 28. 18:36

Styled Component말고도 Sass도 한번 써봐야겠다 싶어서 npm으로 설치하였더니(로컬) 해당 오류가 발생했습니다.

node-modules를 삭제하고 npm install을 해봐도 해결이 안돼서 검색을 해보니 버젼을 낮춰서 깔아야 하는 듯 합니다.

 

현재 node-sass의 버전은 6.0.1입니다.

node의 버전은 14.16.0입니다.

 

 

 

www.npmjs.com

 

npm

Bring the best of open source to you, your team, and your company Relied upon by more than 11 million developers worldwide, npm is committed to making JavaScript development elegant, productive, and safe. The free npm Registry has become the center of Java

www.npmjs.com

node-sass의 정보를 확인해보니, Node 13까지는 5 밑으로만 깔아주면 됐던 듯 합니다.

 

 

 

package.json파일에서 버젼 앞에 있었던 캐럿(^)을 수정했습니다.

그 다음 node-modules를 삭제 후 npm install 명령어를 통해 모듈을 다시 설치해주면 node-sass가 5보다 낮은 버젼으로 설치되며 정상적으로 작동합니다.

 

 

 

 

 

'package.json파일은 npm으로 설치하면 버젼 정보가 기록되는구나' 라고만 생각했는데 그거보다 훨씬 더 많은 정보가 담겨있었습니다. 나중에 한번 package.json파일에 대해 정리해야 할 것 같습니다.

 

 

 

'WEB > React' 카테고리의 다른 글

[React] Redux 도입  (0) 2021.06.29
[Sass] Sass를 이용한 버튼 컴포넌트 스타일링  (0) 2021.06.29
[React] React Redux의 개념  (0) 2021.06.25
[React] 클래스에서 라이프사이클 구현  (0) 2021.06.24
[React] Hook  (0) 2021.06.24
Comments