Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ng build --prod throws error #16107

Closed
asamaniananth opened this issue Nov 7, 2019 · 1 comment

Comments

@asamaniananth
Copy link

@asamaniananth asamaniananth commented Nov 7, 2019

I have tried to run the below commands in Azure devops, and it throws error, but on my local it builds successfully for the command.

Set-Location "$(Build.Repository.LocalPath)\Buffini.Web.UI\Angular"
Write-Host 'Angular Install Starting'
npm install -g @angular/cli@8.0.6 -Verbose
Write-Host 'Angular Install Ending'

Write-Host 'NPM Install Starting'
npm install -Verbose
Write-Host 'NPM Install Ended'

Write-Host 'Angular Build Starting'
ng build --prod -Verbose
Write-Host 'Angular Build Ending'

I have tried many combinations as well, but nothing worked.
Combinations:
ng build --prod=true
ng build --configuration=production
ng build --prod --configuration=production

image

@asamaniananth

This comment has been minimized.

Copy link
Author

@asamaniananth asamaniananth commented Nov 8, 2019

I figured what the issue was.
In powershell to get the detail execution we use -verbose, in this particular case we cannot use
ng build --prod -verbose , so the final command should be ng build --prod.
Hope it helps someone like me.
Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.