Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
ng build environment option not working since upgrade to 1.2.3 #7118
Bug Report or Feature Request (mark with an
Just found some new docs here: https://github.com/angular/angular-cli/wiki/build
Not 100% sure what the difference between a target and an environment is?
However, I've just tried the new docs and I'm still getting the same behavior:
ng build --target=development --environment=TEST
All still use the DEV settings
ng build --target=production --environment=TEST
Throws the following error:
ERROR in ./src/main.ts
This seems to be caused by the --target=production flag
ng build --ENV:TEST
Shows a warning:
$ ng build --env:TEST
@Bidthedog We have the same problem (although I'm not sure if this is related to the original problem?):
It seems not to be about the environment itself but rather about
Big +1 to @dprandzioch. It does seem that aot is the issue. I was able to build using
I also think he is right about a dependency updating. This exact version of my code was building Friday afternoon, but this morning it is not. One more argument for using npm-shrinkwrap I suppose
Hopefully this gets some dev attention ASAP
I seem to still be having this issue. Angular-cli 1.6.1, angular-core 4.4.6.
.angular-cli.json env settings:
But the staging variables are not being respected, it falls back to the dev settings.
I'm also finding it troublesome that I can pass any random environment name to the build command and it will not raise an error. Making it very hard to debug configuration at this point.
Any help appreciated, thanks!