title: React JS Azure DevOps Web app won't run but files are present in server and no errors in pipelines
body: <p>I am doing a simple Azure DevOps CICD deployment. I am following all the steps. First up, here is my YAML file. I have kept the comments as it is, just in case, I am making more mistakes than I am aware of.</p>
  <pre><code>trigger:
  - master
  
  pool:
    vmImage: 'ubuntu-latest'
  
  
  # Set variables
  variables:
    directory: ReactJSRecipeApp
  
  
  steps:
  - task: NodeTool@0
    inputs:
      versionSpec: '12.13.0' 
    displayName: 'Install Node.js'
  
  - script: 
      npm install
    displayName: 'npm install'
  
  - script:
      npm run build
    displayName: 'npm build'  
  
  - task: CopyFiles@2
    displayName: 'Copy files'
    inputs:
      sourceFolder: 'build' 
      Contents: '**/*'
      TargetFolder: '$(Build.ArtifactStagingDirectory)'
      cleanTargetFolder: true
  
  
  - task: ArchiveFiles@2
    displayName: 'Archive files'
    inputs:
      rootFolderOrFile: '$(Build.ArtifactStagingDirectory)'
      includeRootFolder: false
      archiveType: zip
      archiveFile: $(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip
      replaceExistingArchive: true    
  
  
  - task: PublishBuildArtifacts@1
    displayName: 'Publish Build Artifacts'
    inputs: 
      pathtoPublish: $(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip
      ArtifactName: 'www' # output artifact named www
  
  
  - task: AzureWebApp@1
    displayName: 'Deploy to App Service'
    inputs:
      azureSubscription: 'ReactJSRecipeAppConnection'
      appName: 'reactjsrecipeappwebapp2'
      appType: 'webApp'
      package: '$(System.ArtifactsDirectory)/$(Build.BuildId).zip'
      customWebConfig: '-Handler iisnode -NodeStartFile server.js -appType node' 
  </code></pre>
  <p>So, when I run this, I get no errors in the Pipeline.</p>
  <p>Further, I want to point out the following.</p>
  <ul>
  <li>If I download the artifacts zip folder, I am able to run that folder locally and get my react app running in a localhost server just fine.</li>
  <li>I check my Azure web app via Kudo Tools, I see all the files inside wwwroot, with timestamps that match the zip file from the artifact folder. So, I am assuming that the files are indeed getting pushed and to the correct spot in the web server.</li>
  <li>Before I run the CICD trigger, these azure web apps were created brand new, and I get the standard azure welcome/landing page. So, the web apps themselves are fine.</li>
  </ul>
  <p>After all this, the website itself does not serve the pages. I get a 404. I have tried two different web apps on Azure but the same results.</p>
  <p>Any advise, where I am going wrong?</p>
  <p><strong>Update 1</strong></p>
  <p>I decided to manually check the files on Filezilla. But, its empty!!!</p>
  <p><a href="https://i.stack.imgur.com/vcILT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vcILT.png" alt="enter image description here" /></a></p>
  <p>But, KUDO shows files. I dont understand!</p>
  <p><a href="https://i.stack.imgur.com/ij5Jb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ij5Jb.png" alt="enter image description here" /></a></p>
  <p><strong>Update 2</strong></p>
  <p>So, I did a direct deploy from visual studio code with the artifact publish folder. the web app runs fine. So, did this step to make sure that the web app is configured correctly.</p>