Azure静态Web应用程序部署管道错误与NX MonorePo
我正在尝试部署NX MonorePository中的角度应用程序,但我会收到此错误:
检测平台...
无法检测到源目录中的任何平台。
错误:无法从repo中检测到语言。
部署管道看起来像这样:
trigger:
- master
- main
- pipeline
pool:
vmImage: ubuntu-latest
steps:
- task: NodeTool@0
inputs:
versionSpec: '16.x'
- task: CmdLine@2
displayName: 'Directory listing'
inputs:
script: |
cd $(Agent.BuildDirectory)/apps/luis
ls -Rla
- script: |
cd ./apps/luis/
npm install --location=global @angular/cli
npm install
npm run build
displayName: 'npm install and build'
- task: AzureStaticWebApp@0
inputs:
app_location: "apps/luis"
api_location: ""
output_location: "dist/apps/luis"
env:
azure_static_web_apps_api_token: $(deployment_token)
这是文件夹结构:
编辑: 我通过将应用程序位置更改为应用程序/luis/src来解决第二个错误,从而可以找到index.html文件。但是第一个初始错误仍未解决。
I am trying to deploy an Angular Application that is inside a Nx Monorepository but I get this error:
Detecting platforms...
Could not detect any platform in the source directory.
Error: Could not detect the language from repo.
The deployment pipeline looks like this:
trigger:
- master
- main
- pipeline
pool:
vmImage: ubuntu-latest
steps:
- task: NodeTool@0
inputs:
versionSpec: '16.x'
- task: CmdLine@2
displayName: 'Directory listing'
inputs:
script: |
cd $(Agent.BuildDirectory)/apps/luis
ls -Rla
- script: |
cd ./apps/luis/
npm install --location=global @angular/cli
npm install
npm run build
displayName: 'npm install and build'
- task: AzureStaticWebApp@0
inputs:
app_location: "apps/luis"
api_location: ""
output_location: "dist/apps/luis"
env:
azure_static_web_apps_api_token: $(deployment_token)
This is the folder structure:
EDIT:
I fixed the second error by changing the app location to apps/luis/src such that it can find the index.html file. But the first initial error is still not solved.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我通过将
app_location
设置为“/”
来修复它。I fixed it by setting the
app_location
to"/"