[이슈해결] Git & Expo-CLI - Input is required, but Expo CLI is in non-interactive mode.
Error Message: Input is required, but Expo CLI is in non-interactive mode.
🌰 오류메시지
1 2
[17:52:12] Input is required, but Expo CLI is in non-interactive mode. --template: argument is required in non-interactive mode. Valid choices are: 'blank', 'blank (TypeScript)', 'tabs', 'minimal', 'minimal (TypeScript)' or any custom template (name of npm package).
💎 문제상황
토이프로젝트로 진행중인 Kawai Todo App with React Native를 위해 expo를 사용하려고 했습니다. expo-cli 설치를 하기위해 Git Bash에서 npm install expo-cli --global 입력 후, new project를 생성하기 위해 expo init Kawai-Todo을 입력했더니 Input is required, but Expo CLI is in non-interactive mode.라는 에러메시지가 발생했습니다.
🧩 예시코드
Wrong Code : Git Bash에서 입력 후 Error가 발생한 명령어입니다.
1
$ expo init Kawai-Todo
🔑 해결방안
1) Git Bash에서 사용했던 명령어를 cmd에서 입력했더니 다음 단계로 잘 넘어가집니다.
Right Code : cmd에서 Error를 해결한 명령어입니다. 기존 명령어와 같습니다.
1
$ expo init Kawai-Todo
2) 하단의 내용에서 방향키를 이용하여 원하는 항목을 선택하고 엔터키를 입력합니다.
1 2 3 4 5 6 7 8
? Choose a template: (Use arrow keys) ----- Managed workflow ----- > blank a minimal app as clean as an empty canvas blank (TypeScript) same as blank but with TypeScript configuration tabs several example screens and tabs using react-navigation ----- Bare workflow ----- minimal bare and minimal, just the essentials to get you started minimal (TypeScript) same as minimal but with TypeScript configuration
? Choose a template: expo-template-blank ? Please enter a few initial configuration values. Read more: https://docs.expo.io/versions/latest/workflow/configuration/ » 50% completed { "expo": { "name": "<The name of your app visible on the home screen>", "slug": "Kawai-Todo" } }
4) 다음과 같이 100%로 바뀌었다면 앱 설정이 완료되었습니다.
1 2 3 4 5 6 7 8 9
? Choose a template: expo-template-blank ? Please enter a few initial configuration values. Read more: https://docs.expo.io/versions/latest/workflow/configuration/ » 100% completed { "expo": { "name": "Kawai Todo", "slug": "Kawai-Todo" } }
5) 엔터키를 누르면 다음 메시지가 나타나면서 Expo 설치를 시작합니다.
1 2 3 4 5 6
√ Please enter a few initial configuration values. Read more: https://docs.expo.io/versions/latest/workflow/configuration/ · 100% completed Extracting project files... Customizing project... Initialized a git repository. Installing dependencies...
npm WARN deprecated deep-assign@3.0.0: Check out `lodash.merge` or `merge-options` instead. npm WARN deprecated core-js@1.2.7: core-js@<2.6.8 is no longer maintained. Please, upgrade to core-js@3 or at least to actual version of core-js@2.
Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
The project needs your help! Please consider supporting of core-js on Open Collective or Patreon: > https://opencollective.com/core-js > https://www.patreon.com/zloirock
Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
npm notice created a lockfile as package-lock.json. You should commit this file. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
added 783 packages from 427 contributors and audited 37575 packages in 120.979s found 11 low severity vulnerabilities run `npm audit fix` to fix them, or `npm audit` for details
Your project is ready at C:\Users\kimcm\Kawai-Todo
To get started, you can type:
cd Kawai-Todo npm start
🎀 후기
가끔 어떤 명령어는 Git Bash에서 실행이 되지 않을 때가 있습니다. 그럴 때는 cmd에서 한 번 입력해보면 잘 작동되는 경우가 있습니다. Warn 메시지가 수반되는 경우가 있는데, 오류메시지를 해결하기 위해 구글링해보면 Mac OS에서 발견한 적이 없습니다. Windows 환경에서 작업하고 있기 때문일 것이라는 생각이 듭니다. Expo XDE를 사용할 수 있다는 점에서 Mac OS를 쓰고 싶다는 생각이 강력히 드는 Error Message였습니다.