Azure Linux Web 应用程序上的下一个 js 应用程序 - 读取目录时出现错误 eisdir 非法操作 [英] Next js app on Azure Linux web app - Error eisdir illegal operation on a directory read
问题描述
我在 linux 应用服务计划上托管的 Web 应用出现问题,该计划是一个静态的下一个 js 站点,并且在 Azure 存储中使用 cdn & 运行得非常好.基于窗口的网络应用程序(带有额外的文件,如 web.config 和 server.js)
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)
我想在 Azure Web 应用程序(Linux 应用程序服务计划)中运行此程序,但除主页外无法刷新.这在我的本地也很有效.我的网络应用中有以下设置
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
假设我的网站主页 URL 是 xyz.azurewebsites.net,当我导航到帮助页面 (xyz.azurewebsites.net/professionals) 时,它工作正常.但是,如果我刷新页面或尝试直接转到 URL,则会出现以下错误
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
这里是本地运行日志
我正在通过 bitbucket 管道部署它,如下所示
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"
推荐答案
你可以尝试在设置中添加这个吗 =>配置?
Could you try adding this in settings => Configuration?
这篇关于Azure Linux Web 应用程序上的下一个 js 应用程序 - 读取目录时出现错误 eisdir 非法操作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!