-
Notifications
You must be signed in to change notification settings - Fork 12k
Environment flags not working #7138
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
Comments
I have the same problem... the enhanced-resolve hack fixes this? |
any ideas when it started? I'm back to 1.2.2 so far and still broken -- broken in all of 1.2.x? |
ok - it's broken in 1.2... rolling back to 1.1.2 fixed it... |
Running I can't say the following solution is good, but as a temporary workaround I've simply installed
I'm not using this package anywhere else in my project, so this works for me until I find a better way. Maybe I could set up a EDIT: For clarity, my working setup uses |
Issue is described in more detail here: webpack/enhanced-resolve#98 Angular devs checked in a fix earlier today, just a matter of the next release including it (hopefully soon) |
Aaaaaand I missed the part where this exact fix was rolled into the 1.2.4 CLI release yesterday. Update to that version (you should be fine with your Node version) and you should be set. |
I noticed the issue on 1.2.4 -- upgraded yesterday... it wasn't working for me. |
Both my global and local versions are 1.2.4 and it still doesn't work for me. |
I checked @angular/cli version with both 1.1.0 and 1.2.1, but the environment flags were not working. |
still doesnt work for me either - already tried @angular/cli versions 1.2.3, 1.2.4 and 1.3.0-rc.1 build itself works (when using |
Does it have to do anything with the angular version? I am using 4.3.1 version of angular. Should I downgrade angular version to use lower version of cli? I am using angular 4.3.X for the new http interceptors. |
@netdeamon make sure you delete your .lock file when you're rolling back cli (or any package...) -- 1.1.x works for me... |
@chadbr What is the angular version that you are using? I am using 4.3.1 angular and 1.1.2 angular cli version. But it was not picking up the right environment file. I deleted the .lock file as you suggested. Build script
|
Thanks @chadbr , it worked for me. I was experimenting with the .angular-cli.json while solving this issue. Using the 1.1.2 version of angular/cli with 4.3.1 angular worked for me. Thanks |
I tried to repro this on a new project using
So I think it is working correctly. You mentioned you used yarn though... and as far as I know there is a problem with yarn itself: #7136 (comment) I'm closing this issue in favor of that one. |
for people following along... 1.2.6 fixes the issue for me. thanks -- Chad |
I'm sorry but it's still not working for me (I'm using angular-cli 1.4.4) i have this : and it uses prod configuration |
Same issue with custom flag. |
I'm having this issue when using |
I solved my problem now with many apps environment, it is a path problem I guess, you can do below for resolve this issue. "environments": {
"dev": "./environments/environment.ts",
"prod": "./environments/environment.prod.ts",
"local": "./environments/environment.local.ts"
} move ng s -a someApp -e local
ng b -a someApp -e local
ng b -a someApp --prod // for production
ng s -a someApp // for development |
@filipesilva should I open a new bug report for this or should this one be re-opened? |
@chadbr can you provide a reproduction I can follow to see it not working please? Happy to reopen then. |
same issue ("@angular/cli": "1.4.9"),.....and the bug is listed as closed? |
Closed
Le jeu. 12 avr. 2018 à 15:04, Darin Cardin <[email protected]> a
écrit :
… same issue ***@***.***/cli": "1.4.9"),.....and the bug is listed as closed?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#7138 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AUN9Jzsz9uFpsCcC_Ms24V57Knqr4FOAks5tn6UlgaJpZM4Oi2k0>
.
|
it seems broken again with |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Bug Report or Feature Request (mark with an
x
)Versions.
Repro steps.
Desired functionality.
It should import the correct environment properties accordingly to the flag used.
Mention any other details that might be useful.
It stopped working after a yarn upgrade ran on my project and then I tested with a fresh new project generated by the cli.
The text was updated successfully, but these errors were encountered: