我在使用api-platform / client-generator进行初始设置时遇到麻烦,以响应native / expo

问题描述 投票:0回答:1

我遵循指南form api-platform并在初始博览会运行时出现错误

$ yarn global add expo-cli
$ expo init my-app
# When asked, choose to use the blank template
$ cd my-app

$ yarn add redux react-redux redux-thunk redux-form react-native-elements react-native-router-flux react-native-vector-icons prop-types whatwg-url buffer react-native-event-source

$npx @api-platform/client-generator https://demo.api-platform.com . --generator react-native --resource book

之后,您需要修改App.js并从此链接https://api-platform.com/docs/client-generator/react-native/#generating-a-native-app创建Route.js

并运行

expo start

我有一个错误

Invariant Violation: Invariant Violation: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.

Check the render method of `ListComponent`.

This error is located at:
    in RCTView (at View.js:45)
    in View (at ScrollView.js:976)
    ...

This error is located at:
    in NavigationContainer (at Router.js:97)
    in App (at Router.js:122)
    in Router (at Router.js:8)
    in RouterComponent (at App.js:34)
  ...


issue

react-native expo api-platform.com
1个回答
0
投票

使用旧版本的react-native-elements的api-platform / client-generator

在控制台中键入

 expo install [email protected]

并且有效

© www.soinside.com 2019 - 2024. All rights reserved.