Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

473
Visualizações
How to use AWS Amplify in React Native with Typescript Project?

I'm trying to add Amplify Authentication in my react native project which uses typescript. There is a package given in amplify documentation 'aws-amplify-react-native' which is used as a middleware to authenticate our application. But this package is only supported in projects which are based on javascript. For Typescript it shows an error like

Could not find a declaration file for module 'aws-amplify-react-native'.
Try `npm install @types/aws-amplify-react-native` if it exists or add a new declaration (.d.ts) file containing `declare module 'aws-amplify-react-native';`

There is no package available like '@types/aws-amplify-react-native'

So anyone can help me out of this?

over 4 years ago · Santiago Trujillo
3 Respostas
Responde à pergunta

0

Unfortunately there are no defined types at the time of this answer. However, you can invoke @ts-ignore like so

// @ts-ignore
import Amplify, { Auth } from 'aws-amplify';
// @ts-ignore
import awsconfig from './aws-exports';
// @ts-ignore
import { withAuthenticator } from 'aws-amplify-react-native'

Amplify.configure(awsconfig);
over 4 years ago · Santiago Trujillo Relatório

0

There are no official TypeScript (TS) types available for aws-amplify-react-native at the moment. To suppress the TypeScript warning, you need to define your own TS declaration file (*.d.ts).

To get approximate typings, you can copy this file into your project. These are typings written by the GitHub user dantasfiles. Bear in mind that they are not exact and could be specified more precisely.

over 4 years ago · Santiago Trujillo Relatório

0

I installed this in my typescript project and I have no issue:

 npm install aws-amplify aws-amplify-react-native @react-native-community/netinfo @react-native-async-storage/async-storage

https://docs.amplify.aws/start/getting-started/setup/q/integration/react-native/#initialize-a-new-backend

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda