世博会说当地人不见了

时间:2019-07-11 23:19:14

标签: react-native

我通过运行Facebook指南安装了Expo

    npm install -g expo-cli
    npm install react-navigation
    expo start

但是仍然说

npm WARN @react-native-community/netinfo@2.0.10 requires a peer of react-native@>=0.57 <0.60 but none is installed. You must install peer dependencies yourself.
npm WARN react-google-maps@9.4.5 requires a peer of @types/googlemaps@^3.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-google-maps@9.4.5 requires a peer of @types/markerclustererplus@^2.1.29 but none is installed. You must install peer dependencies yourself.
npm WARN react-google-maps@9.4.5 requires a peer of @types/react@^15.0.0 || ^16.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-native-reanimated@1.0.1 requires a peer of react@16.0.0-alpha.6 but none is installed. You must install peer dependencies yourself.
npm WARN react-native-reanimated@1.0.1 requires a peer of react-native@^0.44.1 but none is installed. You must install peer dependencies yourself.
npm WARN react-native-webview@5.8.1 requires a peer of react-native@>=0.57 <0.60 but none is installed. You must install peer dependencies yourself.
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"})

我试图删除我的node_modules文件夹并在项目目录中重新运行npm install

尽管运行,它仍然显示未找到react-native

    react-native -v

在命令行中显示

    react-native-cli: 2.0.1
    react-native: 0.60.3

1 个答案:

答案 0 :(得分:0)

实际上,您仅安装了expo-cli,而没有响应本机cli,即使package.json具有react-native,也无法从cli访问它。因此您必须单独安装react-native-cli才能访问react-native。

npm install –g react-native-cli