
The error
Could not find a declaration file for module 'appwrite'. 'c:/Users/ASUS/OneDrive/Desktop/my-vue-app/node_modules/appwrite/dist/esm/sdk.js' implicitly has an 'any' type.
There are types at 'c:/Users/ASUS/OneDrive/Desktop/my-vue-app/node_modules/appwrite/types/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'appwrite' library may need to update its package.json or typings.
tsconfig.json
{
"compilerOptions": {
"target": "ESNext",
"lib": ["DOM", "DOM.Iterable", "ESNext"],
"module": "ESNext",
"skipLibCheck": true,
/* Bundler mode */
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react-jsx",
/* Linting */
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true
},
"include": ["src"],
"references": [{ "path": "./tsconfig.node.json" }]
}

Why can't ts deted the types in appwrite?

If the tsconfig has moduleResolution: "bundler"
it doesn't support appwrite types

So if you change it to node
, it works?

What version of the Appwrite SDK did you install?

Would you be able to create a GitHub issue for this?

sure :)

Yes works like a charm

11.0.0


Thanks. After googling a bit it seems like this might be a newer typescript config and we can get it to work if we update a few things in the sdk. Thanks so much for bringing this to our attention! š

lemme know if I can drop a PR for this?

Sorry, I just did: https://github.com/appwrite/sdk-generator/pull/653

hehe its ok :)

The issue getting solved is more important, thanks :)
Recommended threads
- Duplicate name types with multiple datab...
Hello, we are having multiple databases and would like to use the cli to generate the types using (appwrite types --language ts), the issue is that the appwrit...
- Appwrite website is not opening on Airte...
help please
- Error getting session: AppwriteException...
I get this error `Error getting session: AppwriteException: User (role: guests) missing scope (account)` when running in prod. As soon as I try running my app o...
