Setting WEBSITE_RUN_FROM_PACKAGE to 1 and having cache

KoyaRishi-2480 0 Reputation points
2025-03-19T15:22:24.2+00:00

Hi, I recently enabled zip deployment for my NextJS application and set WEBSITE_RUN_FROM_PACKAGE to 1. Having read the documentation I know it makes the wwwroot folder read only.

However, I have some static files in Next which used to be cached under wwwroot/cache. I am now getting errors in my logs:

Failed to update prerender cache for 1642cd5060d84196a6e3e165c43d49cde1caef2ddbaab05d155de5f70d8c5bdf Error: ENOENT: no such file or directory, mkdir '/home/site/wwwroot/app-name/standalone/apps/app-name/.next/cache'

Is there any way to move the cache folder outside of wwwroot?

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,930 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.