appwrite / sdk-for-react-native

[READ ONLY] Official Appwrite React Native SDK 💙 ⚛︎
https://appwrite.io
BSD 3-Clause "New" or "Revised" License
3.76k stars 21 forks source link

🐛 Bug Report: Could not find a declaration file for module 'react-native-appwrite'. node_modules/react-native-appwrite/dist/cjs/sdk.js' implicitly has an 'any' type. Try `npm i --save-dev @types/react-native-appwrite` if it exists or add a new declaration (.d.ts) file containing `declare module 'react-native-appwrite' #13

Closed bryanltobing closed 6 months ago

bryanltobing commented 7 months ago

👟 Reproduction steps

i created an empty expo app

npx create-expo-app my-app

install react-native-appwrite using this command

npx expo install react-native-appwrite react-native-url-polyfill

👍 Expected behavior

it should typed correctly

👎 Actual Behavior

image

🎲 Appwrite version

Different version (specify in environment)

💻 Operating system

MacOS

🧱 Your Environment

v0.2.2

👀 Have you spent some time to check if this issue has been raised before?

🏢 Have you read the Code of Conduct?

SayanDasDev commented 7 months ago

yeah same error here

edit: did a little checking the error will be fixed just by adding /src after react-native-appwrite like this import { Account } from "react-native-appwrite/src";

because the index.ts file is in src folder

aaronksaunders commented 7 months ago

@SayanDasDev this works, but hopefully it will be properly fixed

Gincioks commented 6 months ago

Until it is fixed, you can use my extended SDK. https://github.com/Arietta-Studio/appwrite-sdk-ts. Hope it helps.

stnguyen90 commented 6 months ago

Fixed in https://github.com/appwrite/sdk-for-react-native/releases/tag/0.3.1