728x90
맥북으로 프로젝트를 개발할때 node-sass 버전에는 아무런 문제가 없었는데,
윈도우로 프로젝트를 pull 하고, node-sass를 설치했을때 아래와 같은 에러가 발생하였다.
npm ERR! gyp ERR! node -v v20.9.0
검색하여 찾아보니 현재 설치된 node버전이 지원하는 node-sass 버전이 아니여서 발생하는 문제였다.
Node.js Sass version 7.0.0 is incompatible with ^4.0.0 || ^5.0.0 || ^6.0.0
I used Node.js v16.13.1 and created a React application. I tried to use Sass, but when I tried to run it, I got this error: Node Sass version 7.0.0 is incompatible with ^4.0.0 || ^5.0.0 || ^6.0.0
stackoverflow.com
package.json을 열어보니 7 버전대였고, 사용하고 있는 node 버전은 v20.9.0 이였다.
스택오버플로우의 참고 글을 보면 node 버전이 20대일 경우 9 버전 이상의 sass 버전이 필요하다고 명시되어있었다.
따라서 최신의 버전으로 node-sass 버전을 변경하였다.
npm i node-sass@latest
node 버전 v20.9.0
node-sass 버전 v9.0.0으로 맞추니 오류없이 로컬에서 깨끗하게 잘 나온다.
😊
'DEVELOP' 카테고리의 다른 글
[SCSS, CSS] Format 종류에 관하여 (0) | 2025.02.07 |
---|---|
[React.js] style-component와 framer-motion 컴포넌트화 하기 (0) | 2024.11.08 |
[React.js] Cannot find module 'img/full.mp4' or its corresponding type declarations. : React.js video 사용하기 (1) | 2024.09.04 |
[Javascript] IOS 대응을 위한 webm <-> mp4 변환 스크립트 (0) | 2024.07.08 |
React.js) react already included file name (0) | 2024.06.03 |