Welcome to Shaun Luttin's public notebook. It contains rough, practical notes. The guiding idea is that, despite what marketing tells us, there are no experts at anything. Sharing our half-baked ideas helps everyone. We're all just muddling thru. Find out more about our work at bigfont.ca.

Mystery: Aurelia install and build sometimes fails when run in the deployment target after Kudu Sync.

Tags: aurelia, aurelia-cli, kudu, kudu-sync, azure-app-service, azure-web-apps, azure-websites

The problem is these two commands.

npm install -y --production
node_modules/.bin/au build --env production

Those two commands

  • work on a development machine,
  • work in the Azure App Service, if we run them in the deployment source (before Kudu Sync), and
  • sometimes do not work, if we run them in the deployment target (after Kudu Sync).

When those commands do not work in the deployment target (i.e. in D:\home\site\wwwroot), they still do not work if we "Redeploy" - unless we delete everything in wwwroot before doing the redeploy.

What exactly do we need to delete for the redeploy to work?

  • node_modules
  • scripts
  • src
  • something-else?

We prefer to run those two problematic commands inside the deployment target, because then we do not have to re-install all of the node_modules, which we do not store in version control.