ng-deploy-azure icon indicating copy to clipboard operation
ng-deploy-azure copied to clipboard

Target did not produce any files, or the path is incorrect.

Open patoncrispy opened this issue 5 years ago • 3 comments

Describe the bug I have configured my azure.json file with the correct values according to the AzureJSON interface (using the ng add @azure/ng-deploy command). When I try to run ng run <project-name>:deploy I get told that my path is empty (which it isn't). It then runs my build command and once again complains that my path is empty (which it isn't).

I also noticed that getFiles ignores directories https://github.com/Azure/ng-deploy-azure/blob/master/src/builders/actions/deploy.ts#L121. I have an assets folder in my build directory that should be included in the deployment.

My Angular application has multiple projects (app + libraries), if that bears any relevance.

To Reproduce Steps to reproduce the behavior:

  1. Create an angular app with projects.
  2. Try to deploy a project.

Expected behavior ng run <project-name>:deploy should deploy my project compiled in the directory specified in azure.json.hosting[0].app.path.

Screenshots

Screenshot 2019-09-12 at 14 43 34

Desktop (please complete the following information):

  • OS: OSX 10.14.6
  • Browser n/a
  • Version n/a

patoncrispy avatar Sep 12 '19 13:09 patoncrispy

Any news on this? =)

EDIT:

I had a look into my local setup. I'm using a default nx workspace and when i run a ng run portal:deploy i get the error. Digging into what is happening, i saw, that the getFiles() function is called with: { filesPath: '/Users/XXX/Development/XXX/apps/portal/dist/apps/portal' }

So it seems to create a wrong path from

projectRoot + the config path from azure.json

where it should use

workspaceRoot + the config path from azure.json

... when i change it locally, i get Azure errors.

I hope to find some time to dig into the issue, but maybe this helps =)

BernhardRode avatar Feb 14 '20 09:02 BernhardRode

gettint the same error when trying to deploy from a Nx workspace.

pierfreeman avatar Jun 04 '21 13:06 pierfreeman

I am getting the same error and this is the only place I have found someone with the same problem. I have the same set up as OP - multiple projects.

my azure.json:

{
  "hosting": [
    {
      "app": {
        "project": "project-name",
        "target": "build",
        "configuration": "production",
        "path": "dist/project-name"
      },
      "azureHosting": {
        "subscription": "subscription-number",
        "resourceGroupName": "project-name-static-deploy",
        "account": "projectnamestatic"
      }
    }
  ]
}

angular.json deploy object under the respected project:

 "deploy": {
          "builder": "@azure/ng-deploy:deploy",
          "options": {
            "host": "Azure",
            "type": "static",
            "config": "azure.json"
          }
        }

Any news on this? Can find hardly any information on this configuration. I followed this tutorial and thought it would be simple :/

I've built this app successfully and uploaded it to Azure websites. I was hoping to automate the process with ng-deploy.

amandasimonds avatar Sep 23 '21 19:09 amandasimonds