Back

Need Help with Appwrite Cloud Function: 'node-appwrite' Module Not Found Issue

  • 0
  • Functions
  • Web
anyuru
2 Oct, 2023, 08:13

I've been working with Appwrite cloud functions, closely following the documentation. I successfully deployed a function, but when trying to execute it, I'm getting an error that says it can't find the 'node-appwrite' module. I used 'appwrite init' to create and 'appwrite deploy function' to deploy the functions. I also tried manual deployment with the same issue. My Appwrite version is 1.4.3. I've attached screenshots here and I could use any help from the community here.

TL;DR
User is having trouble with the 'node-appwrite' module not being found when trying to execute an Appwrite cloud function. They have tried deploying the function using both 'appwrite init' and manual deployment methods, but the issue persists. Their Appwrite version is 1.4.3. They are seeking help from the community. Solution: One suggestion is to try adding a "commands" key with the value of "npm install" in the appwrite.json file. Another suggestion is to try running "npm install" in the Build Command section either when uploading the function or from the Settings tab and then redeploying.
anyuru
2 Oct, 2023, 09:21

Is there anyone to help me with this?

darShan
2 Oct, 2023, 09:26

Try npm install in the Build Command section either when uploading the function or from the Settings tab & Redeploy.

anyuru
2 Oct, 2023, 09:29

I'm deploying using the cli. I cannot find where to do this.

darShan
2 Oct, 2023, 09:31

either on the Settings tab, or in the appwrite.json.

anyuru
2 Oct, 2023, 09:33

That's the appwrite.json

anyuru
2 Oct, 2023, 09:33

There is no command for building.

anyuru
2 Oct, 2023, 09:34

In the settings tab. The only options that are customizable are the ones with github.

darShan
2 Oct, 2023, 09:35

I'm not sure of the key, but try by adding a "commands":"npm install".

anyuru
2 Oct, 2023, 09:39

It's not the key

anyuru
2 Oct, 2023, 09:40

I've tried deploying but still not working

darShan
2 Oct, 2023, 09:41

can you show the appwrite.json with the commands added?

anyuru
2 Oct, 2023, 09:45

I had added it at function level

anyuru
2 Oct, 2023, 09:45

I've also tried it at project level. It's bringing another error

darShan
2 Oct, 2023, 09:45

cli & appwrite version?

anyuru
2 Oct, 2023, 09:46

appwrite version 1.4.3

anyuru
2 Oct, 2023, 09:46

Cli version 2.0.2

darShan
2 Oct, 2023, 09:46

Update cli to 4.1.0 which supports appwrite 1.4.x.

darShan
2 Oct, 2023, 09:47

after that the commands key will be picked up by the cli.

anyuru
2 Oct, 2023, 09:47

Alright. Let me try that and get back

darShan
2 Oct, 2023, 09:48

Sure.

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