-1

I recently started following a tutorial to have user authentication handled by aws on the backend. After configuring everything, the imported libraries become depricated in the node_module folder and everything seems inaccessible. Any information regarding how to fix this is greatly appreciated. When I remove the AWS imports my program runs normally:

P.S. I also tried using "@aws-amplify/core" in place of "aws-amplify" and it did not solve the problem.

import { StatusBar } from 'expo-status-bar';
import { SafeAreaProvider } from 'react-native-safe-area-context';
//import Amplify from 'aws-amplify'; --not working
//import {withAuthenticator} from 'aws-amplify-react-native'; --not working
import config from './src/aws-exports'; //working


import useCachedResources from './components/hooks/useCachedResources';
import useColorScheme from './components/hooks/useColorScheme';
import Navigation from './components/navigation';


//Amplify.configure(config);

function App() {
  const isLoadingComplete = useCachedResources();
  const colorScheme = useColorScheme();

  if (!isLoadingComplete) {
    return null;
  } else {
    return (
      <SafeAreaProvider>
        <Navigation colorScheme={colorScheme} />
        <StatusBar />
      </SafeAreaProvider>
    );
  }
}

//export default App;
export default withAuthenticator(App);

winterx0
  • 17
  • 7
  • Explain what "the imported libraries become depricated" (assume this should have been deprecated) means and any errors or warnings you're getting. – possum Oct 29 '22 at 16:21