Back

EPERM: operation not permitted, scandir problem when deploying functions

  • 0
  • Functions
aipoweredempire
27 Jul, 2023, 17:07

Hello everyone, I'm getting this problem when deploying a function via Power Shell: EPERM: operation not permitted, scandir 'AppData\Local\Application Data'

Tried to run as admin, but it didn't work.

TL;DR
The user is experiencing a problem when deploying a function via PowerShell, specifically an EPERM error related to scandir. A recommended solution is provided to modify the function code and then use `appwrite deploy function` to deploy again. Another user mentions the option to use `appwrite init function` to initialize the function and `appwrite deploy function` to deploy. The user also asks for clarification on how to write the body of the function. The thread includes discussions on using backticks for multi-line code and running the `pwd` command. The user provides a command example for creating a function deployment in Windows PowerShell. The user seeks
Drake
27 Jul, 2023, 18:17

uhh where are you running the command? and what are you running?

aipoweredempire
28 Jul, 2023, 06:33

In my windows power shell. This is the command: appwrite functions createDeployment --functionId=6012cc93d5a7b --activate=true --entrypoint="index.py" --code="."

Docker is running to make the local server available for testing.

Drake
28 Jul, 2023, 07:10

Can you execute pwd?

Drake
28 Jul, 2023, 07:10

Btw, it's best to use 3 back ticks with multi-line code. See https://www.markdownguide.org/extended-syntax/#syntax-highlighting

Drake
28 Jul, 2023, 07:11

I highly recommend using appwrite init function to initialize your function and appwrite deploy function to deploy

aipoweredempire
31 Jul, 2023, 12:40

Thanks a lot for your solution. I will try it out and hope it works.

aipoweredempire
31 Jul, 2023, 12:43

This solution worked, but how can I write the body of the function this way?

Drake
31 Jul, 2023, 18:26

Init creates the function code. You can modify it as you'd like and then run appwrite deploy function to deploy again

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