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
- Cannot use custom SMTP for messaging (SM...
Hey there! I'm on Appwrite Self-hosted 1.9.0. I've never used the messaging feature before, always sent emails through functions or a custom backend, but I'v...
- CORS errors in Obsidian custom plugin
Hi, anyone here familiar with obsidian community plugins? In short: it's a local first note app which supports writing your own add-ons / plugin But I keep get...
- > AppwriteException: The requested servi...
When trying to read or write from my database I get the following error: > AppwriteException: The requested service is disabled. You can enable the service from...