簡體   English   中英

錯誤“無法解析模塊 aws-amplify-react-native”

[英]Error "Unable to resolve module aws-amplify-react-native"

在此處輸入圖像描述

我嘗試將我的應用程序與 aws amplify 同步,但發生了這個問題

我的 App.js

import { StatusBar } from 'expo-status-bar';
import { NavigationContainer } from "@react-navigation/native";
import RootNavigator from "./src/navigation/index";
import { Amplify } from "aws-amplify";
import config from "./src/aws-exports";
import { withAuthenticator } from "aws-amplify-react-native";



Amplify.configure(config);

 function App() {
  return (
    <NavigationContainer>
     

       <RootNavigator />

         <StatusBar style="light" />
      
       </NavigationContainer>
  );
}

export default withAuthenticator(App);

放大版本 10.5.1

我如何解決這個問題

可以嘗試以下步驟:

  1. rm -rf node_modules && 紗線緩存清理 && 紗線安裝
  2. cd ios && pod 安裝
  3. 從 ios 文件夾中的 app.xcworkspace 文件中打開 xCode。
  4. Select 從 xCode 產品菜單中清理構建文件夾。
  5. 直接從 xCode 產品菜單運行您的應用程序。

你也可以嘗試: import { withAuthenticator } from "./node_modules/aws-amplify-react-native";

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM