
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
- 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...
- 404 for self-host
docker-compose.yml: x-logging: &x-logging logging: driver: 'json-file' options: max-file: '5' max-size: '10m' services: traefik: ima...
- Is p-limit compatible with Appwrite?
I have a function that makes asynchronous calls to different Appwrite collections. This is how I make the call: ```js await Promise.allSettled([ ...
