ng-deploy-azure
ng-deploy-azure copied to clipboard
Target did not produce any files, or the path is incorrect.
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:
- Create an angular app with projects.
- 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

Desktop (please complete the following information):
- OS: OSX 10.14.6
- Browser n/a
- Version n/a
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 =)
gettint the same error when trying to deploy from a Nx workspace.
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.