Node.js
[Node.js] Mac OS 업데이트 이후 npm install 시 gyp 오류가 날 경우
yonikim
2021. 4. 26. 10:11
728x90
Mac OS 업데이트 이후 npm install 시 아래와 같은 gyp 오류가 발생하면 두가지 방법을 시도해 볼 수 있다.
gyp: No Xcode or CLT version detected! gyp ERR! configure error gyp ERR! stack Error: `gyp` failed with exit code: 1
1. node-gyp 재설치
$ sudo npm uninstall node-gyp -g
$ npm uninstall node-gyp
$ npm install
2. X-code 재설치
먼저 xcode 가 설치되어 있는지 확인해 보자.
$ xcode-select --print-path
Path 가 나오면 해당 경로의 폴더를 삭제한 후 다시 설치해 준다. 없으면 그냥 설치 시작
$ sudo rm -rf /Library/Developer/CommandLineTools
$ xcode-select --install
설치가 잘되었는지 다시 한 번 확인 후, 정상적으로 Path 가 나오면 npm install 을 해준다.
$ xcode-select --print-path
$ npm install
728x90