简体   繁体   中英

How to add aws-Amplify authentication to react-native typescript project template

I'm trying to add Amplify Authentication in my react native project that uses Typescript template . 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 not Typescript. For Typescript it shows an error like

Could not find a declaration file for module 'aws-amplify-react-native'. '/home/george/ELab/node_modules/aws-amplify-react-native/dist/index.js' implicitly has an 'any' type. Try npm i --save-dev @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'

and I have read through the post of other developer who are facing similar problem like this but the was no answer provide can some one please , I beg you help me out here this problem I been trying to fix it for two weeks now

在根文件夹中创建一个新的“aws-amplify-react-native.d.ts”类型文件并粘贴此模块

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM