The "expo" command and "npx expo" serve similar purposes but have slightly different ways of being used in the context of Expo projects.
expo Command:
When you have the Expo CLI (Command Line Interface) globally installed on your system, you can use the "expo" command directly in your terminal. The Expo CLI is a set of commands that allows you to manage and interact with your Expo projects. You use it to start a development server, build your app, run it on simulators/emulators or physical devices, and perform various other tasks related to Expo projects.
For example:
expo start
expo build:android
expo publish
npx expo Command:
The "npx" command is used to execute Node.js packages that are not globally installed. It allows you to run commands from packages that you haven't installed globally on your system. When you use "npx expo," it fetches the Expo CLI package from the npm registry and runs it as if it were installed globally.
This can be useful when you want to use a specific version of the Expo CLI without globally installing it.
For example:
npx expo start
npx expo build:android
npx expo publish
In summary, using the "expo" command directly assumes that you have the Expo CLI installed globally, while using "npx expo" fetches the Expo CLI on demand and executes it. If you don't have the Expo CLI globally installed, or if you want to ensure you're using a specific version of the CLI, using "npx expo" can be a convenient option.
'프로그래밍' 카테고리의 다른 글
NSManagedObject에 대한 설명 (0) | 2023.08.29 |
---|---|
NSPersistentContainer 에 대한 설명 (0) | 2023.08.29 |
[SwiftUI] 메인 디스패치 큐(Main Dispatch Queue) 특징 & 예제코드 (0) | 2023.08.23 |
상관 분석 이해하기: 정의, 예시, 그리고 한계점 (0) | 2023.08.03 |
파이썬으로 GUI 코드를 작성하는데 도움이 되는 서비스 (0) | 2023.06.16 |