Arun Rana
Arun Rana

Reputation: 8606

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

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

enter image description here

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 the below error

enter image description here

here is run logs in local

enter image description here

I am deploying it through the bitbucket pipeline as below

image: node:10.15.3

pipelines:
   default: 
      - step:
        name: Install dependencies
        caches:
          - node
        script:             
          - npm install
    - step:
        name: build
        caches:
          - node
        script:
           - npm run build                             
           - apt update && apt install zip            
           - zip -r out-$BITBUCKET_BUILD_NUMBER.zip . 
        artifacts:
          - out-*.zip                                

    - step:
        name: "Deploy to Azure Web App - Dev"
        deployment: Staging
        script:
          - echo "only for specific brnach"
          - pipe: microsoft/azure-web-apps-deploy:1.0.0
            variables:
                AZURE_APP_ID: $AZURE_APP_ID
                AZURE_PASSWORD: $AZURE_PASSWORD
                AZURE_TENANT_ID: $AZURE_TENANT_ID
                AZURE_RESOURCE_GROUP: $AZURE_RESOURCE_GROUP
                AZURE_APP_NAME: $APP_NAME
                ZIP_FILE: "out-$BITBUCKET_BUILD_NUMBER.zip"

Upvotes: 0

Views: 913

Answers (1)

TechGuru
TechGuru

Reputation: 439

Could you try adding this in settings => Configuration?

enter image description here

Upvotes: 0

Related Questions