Back

[SOLVED] Error while getting Started with Next js and appwrite

  • 0
  • Web
Mehta
5 Aug, 2023, 17:49

I installed appwrite in the project I am working on and while using it for the first time it displays an error: import conf from '@/conf/config' import {Client, Account, ID} from 'appwrite'

Errors: 1-> [{ "resource": "----------/startingwithappwrite/src/appwrite/config.ts", "owner": "typescript", "code": "7016", "severity": 8, "message": "Could not find a declaration file for module 'appwrite'. 'c:/Users/ASUS/Desktop/Project/startingwithappwrite/node_modules/appwrite/dist/esm/sdk.js' implicitly has an 'any' type.\n There are types at 'c:/Users/ASUS/Desktop/Project/startingwithappwrite/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.", "source": "ts", "startLineNumber": 2, "startColumn": 35, "endLineNumber": 2, "endColumn": 45 }]

TL;DR
Solution: In your tsconfig, change the module resolution to "node". This will resolve the error you are experiencing while using Next.js and appwrite.
Drake
5 Aug, 2023, 17:50

In your tsconfig, change module resolution to node

Mehta
5 Aug, 2023, 17:57

OH!<:appwritefire:823999000330895380> Thank you

Mehta
5 Aug, 2023, 17:58

It was wonderful, I sent over an hour finding solution and booom!

joeyouss
8 Aug, 2023, 10:08

[SOLVED] Error while getting Started with Next js and appwrite

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