Next js app on Azure Linux web app - Error eisdir illegal operation on a directory read

Arun Rana 6 Reputation points
2021-04-17T08:16:20.907+00:00

I am getting an issue with my web app hosted on linux app service plan which is a static next js site and is running perfectly fine in Azure storage with cdn & window based web app (with extra files like web.config & server.js)

I would like to run this in Azure web app (Linux app service plan) but the refresh is not working except for the home page. This works perfectly in my local as well. I have below settings in my web app

88738-11.jpg

Suppose my website homepage URL is xyz.azurewebsites.net and when I navigate to the help page (xyz.azurewebsites.net/professionals) it works fine. But, if I refresh the page or try to go to the URL directly it gives me below error

88742-11error.jpg

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

2 answers

Sort by: Most helpful
  1. Kishore Pogaru 0 Reputation points
    2023-06-24T02:13:07.39+00:00

    Arun Rana Were you able to resolve the issue?

    0 comments No comments

  2. Carlos Luis Lachapell Rivera 0 Reputation points
    2025-10-16T15:05:32.9066667+00:00

    I'm having the same problem.

    In the startup command, I have npx serve /home/site/wwwroot -s, but when I refresh the page within a subpage, it redirects me back to the home page, and the browser URL stays on the same subpage it was on.

    User's image

    Any solution for this?

    0 comments No comments

Your answer

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