npm install のエラー(Xcode ライセンス)
npm install していて、 xcodeの同意が表示され、
1 |
You have not agreed to the Xcode license agreements. You must agree to both license agreements below in order to use Xcode. |
space か q を聞かれるのですがあんまりちゃんと読まずに q をEnterしたあとにエラーがインストールが完了出来ませんでした。
1 2 3 4 5 6 7 8 9 10 11 12 13 |
Agreeing to the Xcode/iOS license requires admin privileges, please run “sudo xcodebuild -license” and then retry this command. gyp ERR! build error gyp ERR! stack Error: `make` failed with exit code: 69 gyp ERR! stack at ChildProcess.onExit (/Users/username/.nvm/versions/node/v12.16.2/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23) gyp ERR! stack at ChildProcess.emit (events.js:310:20) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12) gyp ERR! System Darwin 19.4.0 gyp ERR! command "/Users/username/.nvm/versions/node/v12.16.2/bin/node" "/Users/username/.nvm/versions/node/v12.16.2/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /path/to/node_modules/fsevents gyp ERR! node -v v12.16.2 gyp ERR! node-gyp -v v5.1.0 gyp ERR! not ok |
これは別途Xcodeのライセンスに同意する必要があるらしく、
こちらを参考にさせて頂き、
gitコマンド実行時にライセンス同意(Xcode/iOS)を要求された場合の対処法 – Qiita
xcodebuildコマンドを実行
1 |
sudo xcodebuild -license |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
You have not agreed to the Xcode license agreements. You must agree to both license agreements below in order to use Xcode. Hit the Return key to view the license agreements at '/Applications/Xcode.app/Contents/Resources/English.lproj/License.rtf' Xcode and Apple SDKs Agreement PLEASE SCROLL DOWN AND READ ALL OF THE FOLLOWING TERMS AND CONDITIONS CAREFULLY BEFORE USING THE APPLE SOFTWARE OR APPLE SERVICES. THIS IS A LEGAL AGREEMENT BETWEEN YOU AND APPLE. IF YOU AGREE TO BE BOUND BY ALL OF THE TERMS AND CONDITIONS, CLICK THE “AGREE” BUTTON. BY CLICKING “AGREE” OR BY DOWNLOADING, USING OR COPYING ANY PART OF THIS APPLE SOFTWARE OR USING ANY PART OF THE APPLE SERVICES, YOU ARE AGREEING ON YOUR OWN BEHALF AND/OR ON BEHALF OF YOUR COMPANY OR ORGANIZATION TO THE TERMS AND CONDITIONS STATED BELOW. IF YOU DO NOT OR CANNOT AGREE TO THE TERMS OF THIS AGREEMENT, YOU CANNOT USE THIS APPLE SOFTWARE OR THE APPLE SERVICES. DO NOT DOWNLOAD OR USE THIS APPLE SOFTWARE OR APPLE SERVICES IN THAT CASE. 1. Definitions Whenever capitalized in this Agreement: “Agreement” means this Xcode and Apple SDKs Agreement. “Apple” means Apple Inc., a California corporation with its principal place of business at One Infinite Loop, Cupertino, California 95014, U.S.A. “Apple Developer Program License Agreement” means a separate agreement that may be entered into between You and Apple regarding the development and submission o By typing 'agree' you are agreeing to the terms of the software license agreements. Type 'print' to print them or anything else to cancel, [agree, print, cancel] agree You can view the license agreements in Xcode's About Box, or at /Applications/Xcode.app/Contents/Resources/English.lproj/License.rtf |
色々表示されるので、
「agrre」を入力してEnter
再度 npm install を実行したら無事完了出来ました。
( npm install で Xcode のlicence同意の時に space で全文表示させてから agree を打てば良いのかもしれませんが、今は再現出来ないので不明です💦)