ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • mac os gyp: No Xcode or CLT version detected! 오류 (맥 npm 패키지 설치 오류)
    프론트엔드/Vuejs 2020. 9. 18. 17:23

    맥에서 npm 패키지를 설치하다가 오류가 난적이 있습니다.

     

    해당오류는 gyp: No Xcode or CLT version detected! 과 같이 나옵니다.

     

    저의 경우에는 nuxt 신규 프로젝트 하려고 명령어를 치다 다음과 같은 오류를 발견했습니다.

    npx create-nuxt-app frontend 

    이 명령어를 치니 패키지를 가져오는 부분에서 오류가 생겼습니다.

    No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.
    
    No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'.
    
    No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'.
    
    gyp: No Xcode or CLT version detected!
    gyp ERR! configure error 
    gyp ERR! stack Error: `gyp` failed with exit code: 1
    gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
    gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
    npm WARN deprecated core-js@2.6.11: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
    npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
    npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
    npm WARN deprecated request-promise-native@1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
    npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
    npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
    npm WARN deprecated har-validator@5.1.5: this library is no longer supported
    npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
    No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.
    
    No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'.
    
    No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'.
    
    gyp: No Xcode or CLT version detected!
    gyp ERR! configure error 
    gyp ERR! stack Error: `gyp` failed with exit code: 1
    gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
    gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
    gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)

    이런경우 xcode 가 문제인 경우라 다시 재설치를 해주면 되겠습니다.

     

    1. Xcode 설치 경로 확인

    xcode-select --print-path

    변경하지 않았다면 경로는 /Library/Developer/CommandLineTools으로 나타날 것입니다.

    2. Xcode 제거

    sudo rm -r -f /Library/Developer/CommandLineTools

    위에 명령어를 실행하면 제거가 됩니다.

    3. Xcode 재설치

    xcode-select --install

    위에 명령어로 Xcode를 다시 설치해주시면 됩니다.

     

    저 같은 경우에는 명령어로 xcode 재설치가 안되서, 애플 앱스토어에서 설치를 했습니다.

     

    참고문헌

    https://medium.com/flawless-app-stories/gyp-no-xcode-or-clt-version-detected-macos-catalina-anansewaa-38b536389e8d
    반응형

    댓글

Designed by Tistory.