此处为实际图像:https://drive.google.com/open?id=1avqikjxB6n2dnBNh9qZ0Yugk7kNki8wb
终端输出:
Microsoft Windows [Version 10.0.18362.720] (c) 2019 Microsoft Corporation. All rights reserved.
C:\Users\Khalid Babu\Desktop\ReactNative>npx react-native init firstApp
Error: EPERM: operation not permitted, mkdir 'C:\Users\Khalid'
command not found: react-native
...
npx create-react-native-app first-app
确保已全局安装react-native-cli
npm install -g react-native-cli
than
react-native init AwesomeProject
此外,还有一些先决条件。请也检查一下。
Windows→搜索→系统→高级系统设置→环境变量→新建
JAVA_HOME:C:\ path \ to \ JavaSDK
有关更多详细信息,请参见下面的链接中所述
https://shift.infinite.red/getting-started-with-react-native-development-on-windows-90d85a72ae65