尝试遵循"入门"关于React Native的教程,我偶然发现了一些我认为是我的错的东西,但我真的无法找到原因(我有点像菜鸟:/)
为了创建我的第一个项目,我被告知使用" create-react-native-app AwesomeProject"。该脚本首先运行良好
Creating a new React Native app in
C:\Users\b.mathieu\.babun\cygwin\AwesomeProject.
Installing packages. This might take a couple minutes.
Installing react-native-scripts...
> dtrace-provider@0.8.3 install
C:\Users\b.mathieu\.babun\cygwin\AwesomeProject\node_modules\dtrace-provider
> node scripts/install.js
> @exponent/ngrok@2.2.7 postinstall
C:\Users\b.mathieu\.babun\cygwin\AwesomeProject\node_modules\@exponent\ngrok
> node ./postinstall.js
ngrok - binary unpacked.
然后是一棵长树,我相信我的项目的树。但后来我得到了
npm WARN xdl@42.0.0 requires a peer of react@16.0.0-alpha.12 but none was installed.
npm WARN react-redux@5.0.5 requires a peer of react@^0.14.0 || ^15.0.0-0 || ^16.0.0-0 but none was installed.
Installing dependencies using npm...
之后,它只给了我" npm ERR! ..."有一些行,git错误"无法从远程存储库"
读取这可能是一个愚蠢的错误,我真的不知道。我在Windows 10上,我尝试使用"普通" cmd和babun,一个类似linux的终端。
编辑:看来babun事实上是问题所在。使用windows cmd,问题仍然存在:npm WARN react-native-branch@2.0.0-beta.3 requires a peer of react@>=15.4.0 but none was installed.
npm WARN lottie-react-native@1.1.1 requires a peer of react@>=15.3.1 but none was installed.
npm WARN react-native-maps@0.15.2 requires a peer of react@>=15.4.0 but none was installed.