본문 바로가기
개발의 기록/Etc..

xcrun: error: invalid active developer

by prographer J 2022. 11. 7.
728x90

이번에 맥 북 Ventura로 업데이트 후 컴파일을 할 때 위와 같은 오류가 발생할 때가 있다.
이번에 node-sass 쪽에서 계속 에러가 나서 뭐지? 하다가 로그 중에 xcrun이 보이길래..아 이 문제구나! 하고 바로 xcode-select로 설치 후 정상 동작함!


아마도 node-sass가 npm 설치될 때 컴파일이 되나 보다..;;

핵심 에러 코드

error xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

 

대략적인 에러 코드

 

3127 error code 1
3128 error path /Users/prographer/Documents/develop/test/node_modules/node-sass
3129 error command failed
3130 error command sh /var/folders/my/123q18pd5px7wwsw7jwz348w0000gn/T/postinstall-84e90a4c.sh
3131 error Building: /Users/prographer/.nvm/versions/node/v16.17.1/bin/node /Users/prographer/Documents/Develop/test/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
3132 error gyp info it worked if it ends with ok
3132 error gyp verb cli [
3132 error gyp verb cli   '/Users/prographer/.nvm/versions/node/v16.17.1/bin/node',
3132 error gyp verb cli   '/Users/prographer/Documents/Develop/test/node_modules/node-gyp/bin/node-gyp.js',
3132 error gyp verb cli   'rebuild',
3132 error gyp verb cli   '--verbose',
3132 error gyp verb cli   '--libsass_ext=',
3132 error gyp verb cli   '--libsass_cflags=',
3132 error gyp verb cli   '--libsass_ldflags=',
3132 error gyp verb cli   '--libsass_library='
3132 error gyp verb cli ]
.......
.......
3132 error xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
3132 error gyp ERR! build error 
3132 error gyp ERR! stack Error: `make` failed with exit code: 1
3132 error gyp ERR! stack     at ChildProcess.onExit (/Users/prographer/Documents/Develop/test/node_modules/node-gyp/lib/build.js:194:23)
3132 error gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
3132 error gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
3132 error gyp ERR! System Darwin 22.1.0
3132 error gyp ERR! command "/Users/prographer/.nvm/versions/node/v16.17.1/bin/node" "/Users/prographer/Documents/Develop/test/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
3132 error gyp ERR! cwd /Users/prographer/Documents/Develop/test/node_modules/node-sass

 

해결방법

 

$ xcode-select --install
728x90

댓글