Could not list users: axios is not a function. (In 'axios(options)', 'axios' is an instance of Module)
TypeScript
const validateUser = async (client: Client, userId : string) => {
const users = new Users(client)
const user = await users.get(userId)
if (!user) {
return {
code: 400,
message: 'User not found',
}
}
return {
code: 200,
message: "User exists, Proceeding with function execution"
}
}
Can someone help me out with this issue ? Is there a bug with the node appwrite package ?
TL;DR
Issue: Error "axios is not a function" in Appwrite Bun 1.0 function.
Solution: The error is due to using "axios" incorrectly. Make sure to import and use axios properly in your code.
Explanation: The code snippet provided does not show any usage of axios. Double-check your code for proper axios implementation.Recommended threads
- Bulk API limitations in self-hosted serv...
Environment: Appwrite Selfhost SDK: node-appwrite 28.0 Calling `upsertRows` (also applies to `createRows`/`updateRows`/`deleteRows`) with more than 100 rows fa...
- Self Hosted GitHub connection not adding...
After upgrading to 1.9.6 i noticed that i cannot search for new repositories when trying to add new functions. I removed the existing github connection via Set...
- Unable to init function via cli
Hello! I have created a new self hosted instance of appwrite 1.9.6 and have connected to that insatnce with the cli 27.2.0 that was released a few hours ago. Wh...