
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
- Functions in Golang - I need help
Hi guys! I am struggling to deploy a rather simple golang function. The deployment log details are very sparse: "failed error code: 524 " or: "Cannot access ...
- grant permisions only to users in collec...
I'm building a web app and instead of using Appwrite Auth, I made my own custom auth system that stores user data in documents. I have a "Profile" page where lo...
- cli 5.0.5 command for pull and push of d...
Hi i am using selfhosted appwrite 1.5.10, for migration (duplicate project) purpose i am using cli 5.0.5, but i am unable to find commands for pull and push, wh...
