Skip to content
Back

appwrite function not detecting the sdk or working

  • 0
  • Functions
  • Cloud
ianmont
2 Oct, 2023, 03:44

This post is somewhat strange, I've spent hours and hours trying to figure out what the problem is with why my function ignores the entire appwrite part.

I'm making a stripe webhook that then updates a document of the user with some values.

The problem is that the function ignores the entire appwrite part, it is as if it did not exist, I don't understand what is happening.

The stripe part works fine but it's like the appwrite part is invisible code

Heres my code: https://pastebin.com/raw/MGUdMi5h

Also im using appwrite cloud and node-appwrite version 11.0.0

TL;DR
The user is experiencing an issue where their appwrite function is not detecting the SDK or working. They have tried using "then" in their code and making sure the .env files are correct, but the appwrite part is not functioning. They are using appwrite cloud and node-appwrite version 11.0.0. A solution is not provided in the thread.
ianmont
2 Oct, 2023, 03:47

I also made sure that the .env files are correct. I attach an image of the log that I put after the userPlan, it should not be executed since inside the userPlan there is return res.json({}) 🤔

Drake
2 Oct, 2023, 05:57

Because you're using then, that code doesn't execute right away...and then you return.

I highly suggest avoiding using then as it can be confusing and lead to deeply nested code

ianmont
2 Oct, 2023, 15:04

thanks Steven, I'll try that

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more