如何使用React Native解決“無法識別的命令run-ios”錯誤

我如何解決令人困惑的React Native錯誤的快速指南

我正在啟動一個新的React Native項目並運行了命令

npx react-native run-ios

啟動它。

我在此行中返回了一個錯誤:

unrecognized command "run-ios"

I could not figure this out, until I realized I was running this command in my home folder.

Instead, this needs to be run from inside the project’s folder.

cd into the React Native project, and this error should go away and your React Native app should start successfully

Download my free React Handbook


More react-native tutorials: