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
- How to send Webhooks to internal network
When saving the URL for sending Webhooks, Appwrite checks if it's a valid external domain name so entering internal IP address or docker hostnames won't save th...
- Collections list not showing up when try...
I'm trying to create new relationship attribute but both one way and two way relationship is not showing up collections list to connect with my relationship att...
- I have try to use the appwrite in to the...
Invalid Origin. Register your new client (oailedjdbkhlkakmnnapoonllbnfmfij) as a new Web (Chrome Extension) platform on your project console dashboard