Back

[SOLVED] Cannot find Type Declarations on Vite

  • 1
  • Web
falconZ
29 May, 2023, 05:29

When trying to import appwrite client on a React Project with Vite i get the following error.

TypeScript
Could not find a declaration file for module 'appwrite'. '/home/***/project-dev/node_modules/appwrite/dist/esm/sdk.js' implicitly has an 'any' type.
  There are types at '/home/***/project-dev/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.
TL;DR
The user was experiencing an error while trying to import the appwrite client on a React project with Vite. They received an error message stating that the declaration file for the module 'appwrite' could not be found. However, the user found a solution on the appwrite GitHub page (https://github.com/appwrite/sdk-for-web/issues/54). Solution: The user found a fix for the issue on the appwrite GitHub page. They did not specifically mention what the fix was, so it would be necessary to visit the GitHub page for more information.
falconZ
29 May, 2023, 06:29

I see this has already been answered and found the fix on Github https://github.com/appwrite/sdk-for-web/issues/54

Drake
29 May, 2023, 07:16

[SOLVED] Cannot find Type Declarations on Vite

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more