I am trying to run an NodeJs app on Azure app services for Linux. After a failed deployment I would like to delete the wwwroot folder and start from scratch, but I am not able to delete it. I have tried using ssh, bash, ftp and the Kudu REST API, but every time the result is the same.
This is the response from the DELETE call:
{"Message":"Cannot delete directory. It is either not empty or access is not allowed."}
Looks like there's an hidden .bin folder inside /node_modules that is blocking the delete operation.

Any hint?
I ran into this same issue today and resolved it by deleting the following App settings from Azure; WEBSITE_RUN_FROM_ZIP and WEBSITE_RUN_FROM_PACKAGE (Both settings do the same thing, just different names).
This was following instructions in Vikas Guptas blog on 17 Aug.
Not sure if you are using VSTS (Azure devops) but it may be helpful to some people to know that using version 4 of Azure App Service Deploy automatically sets the Website_Run_From_Package flag.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With