.png)
로컬에서 훌륭하게 작동하는 TypeScript + Angle 앱이 있습니다.
App Service(linux nodejs webapp)로 빌드하고 릴리스하는 Azure Devops에서 배포 파이프라인을 설정하려고 합니다.
배관이 작동하고 전체 파이프라인이 빌드 및 릴리스 단계 모두 성공합니다.
그러나 배포된 앱을 작동시킬 수 없습니다. 'npm start'를 시도할 때 'ng 모듈을 찾을 수 없음' 오류가 발생합니다. 그리고 그게 다입니다.
내가 도대체 뭘 잘못하고있는 겁니까? 어떻게 고치는 지?
yaml은 다음과 같습니다.
# Node.js Express Web App to Linux on Azure
# Build a Node.js Express app and deploy it to Azure as a Linux web app.
# Add steps that analyze code, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript
trigger: none
variables:
# Azure Resource Manager connection created during pipeline creation
azureSubscription: 'redacted'
# Web app name
webAppName: 'redacted'
# Environment name
environmentName: 'redacted'
# Agent VM image name
vmImageName: 'ubuntu-latest'
stages:
- stage: Build
displayName: Build stage
jobs:
- job: Build
displayName: Build
pool:
vmImage: $(vmImageName)
steps:
- task: NodeTool@0
inputs:
versionSpec: '14.x'
displayName: 'Install Node.js'
- script: |
npm i -g -force @angular/[email protected]
npm i -force
ng build --prod
displayName: 'npm install etc'
- task: ArchiveFiles@2
displayName: 'Archive files'
inputs:
rootFolderOrFile: '$(System.DefaultWorkingDirectory)'
includeRootFolder: false
archiveType: zip
archiveFile: $(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip
replaceExistingArchive: true
- upload: $(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip
artifact: drop
- stage: Deploy
displayName: Deploy stage
dependsOn: Build
condition: succeeded()
jobs:
- deployment: Deploy
displayName: Deploy
environment: $(environmentName)
pool:
vmImage: $(vmImageName)
strategy:
runOnce:
deploy:
steps:
- task: AzureWebApp@1
displayName: 'Azure Web App Deploy: Redacted'
inputs:
azureSubscription: $(azureSubscription)
appType: webAppLinux
appName: $(webAppName)
runtimeStack: 'NODE|14.x'
package: $(Pipeline.Workspace)/drop/$(Build.BuildId).zip
startUpCommand: 'npm start'
건배,