【问题标题】:Blank app due to terminal error. How to fix this issue to get the app page由于终端错误导致空白应用程序。如何解决此问题以获取应用页面
【发布时间】:2022-01-11 12:05:43
【问题描述】:

我正在开发 React Native 应用程序。我正在运行 yarn 和 expo 进行模拟。我已经安装了所有要求,并且据我所知,代码似乎是正确的。但是我收到了终端错误,因此我看不到我的应用程序并且只显示为空白。

我在终端运行 yarn 然后按 w 获取网站版本时出现以下错误:

我做了:yarn start -> penter code hereressed w 查看 webapp:

› Webpack waiting on http://127.0.0.1:19006 
› Expo Webpack (web) is in beta, and subjectto breaking changes!
Web Bundling complete 9367ms
./node_modules/react-native-maps/index.js:24
"export 'Animated' was not found in './lib/components/MapView'
  22 | 
  23 | export { Marker, Overlay };
  24 | export { Animated, MAP_TYPES, ProviderPropType };     
  25 | 
  26 | export const PROVIDER_GOOGLE = MapView.PROVIDER_GOOGLE;
  27 | export const PROVIDER_DEFAULT = MapView.PROVIDER_DEFAULT;
./node_modules/react-native-maps/lib/components/MapMarker.js:79:12
"export 'ColorPropType' was not found in 'react-native-web/dist/index'
  77 |    * which can be customized by this color. Ignored if a custom marker is being used.

在这种情况下我该怎么办,因为我得到一长串错误说出口没有找到像上面虽然我有它。

【问题讨论】:

    标签: javascript android node.js reactjs react-native


    【解决方案1】:

    我曾经遇到过类似的错误,通过手动安装错误日志中所述的库来解决。

    如果库列表太长,我会尝试清除缓存

    yarn cache clean
    

    并发出另一个库安装命令

    yarn install
    

    【讨论】:

    • 我尝试运行您建议的命令,但仍然遇到同样的问题。如何每年安装库?您有什么建议或资源可以提供。
    • 我已经尝试了您建议的命令,但我仍然在终端中遇到相同的错误。如何解决这个问题。如何手动安装库?您有任何资源或可以帮助我的东西吗?如果是这样,请提供给我。某种存储库。
    • 手动我的意思是“yarn install module_name”之类的东西对不起,我没有任何资源可以提供这件事
    猜你喜欢
    • 2021-04-15
    • 1970-01-01
    • 2017-11-16
    • 2022-07-05
    • 2021-09-23
    • 1970-01-01
    • 2019-06-06
    • 1970-01-01
    • 2012-03-31
    相关资源
    最近更新 更多