[nodejs]error C:<프로젝트 경로>\node_modules\node-sass command failed

wonyu·2022년 1월 10일
0

npm i를 했더니 gyp ERR! 메세지가 주르륵 떴다.
vue나 vue-cli도 잘 깔려있어서 터미널을 다시 읽어보다가 에러의 원인인 것 같은 메세지를 발견했다.

error C:<프로젝트 경로>\node_modules\node-sass command failed

그래서 이 메세지로 구글링을 해봤더니 아래 글이 나왔다.

https://stackoverflow.com/questions/60394291/error-node-modules-node-sass-command-failed

그래서 yarn add node-sass 하고 다시 npm i 했더니 이 문제는 해결되었지만..

npm run serve를 했을 때 Syntax Error: Error: Node Sass version 7.0.1 is incompatible with ^4.0.0. 이러한 에러가 발생했다.

https://stackoverflow.com/questions/70281346/node-js-sass-version-7-0-0-is-incompatible-with-4-0-0-5-0-0-6-0-0

위 글을 참고해서 npm uninstall node-sassnpm install sass 를 통해 해결했다.

0개의 댓글