Cannot pass in multiple configurations using -c since nx 11
See original GitHub issueCurrent Behavior
nx run app-api:build -c=production,dev-environment
Could not find configuration "production,dev-environment" in app-api:build. Valid configurations are: dev-environment, production
Expected Behavior
should be the same as running
nx run app-api:build --configuration=production,dev-environment
this works and applies both production and dev-environment configurations
Steps to Reproduce
create multiple configurations for a app. then apply them both using
-c=config1,config2
This issue may not be prioritized if details are not provided to help us reproduce the issue.
Failure Logs
Could not find configuration “production,dev-environment” in app-api:build. Valid configurations are: dev-environment, production
Environment
Node : 14.15.1
OS : darwin x64
yarn : 1.22.10
nx : Not Found
@nrwl/angular : 11.0.4
@nrwl/cli : 11.0.4
@nrwl/cypress : 11.0.4
@nrwl/devkit : 11.0.4
@nrwl/eslint-plugin-nx : Not Found
@nrwl/express : Not Found
@nrwl/jest : 11.0.4
@nrwl/linter : 11.0.4
@nrwl/nest : 11.0.4
@nrwl/next : Not Found
@nrwl/node : 11.0.4
@nrwl/react : Not Found
@nrwl/schematics : Not Found
@nrwl/tao : 11.0.4
@nrwl/web : Not Found
@nrwl/workspace : 11.0.4
typescript : 4.0.5
Issue Analytics
- State:
- Created 3 years ago
- Reactions:4
- Comments:11 (2 by maintainers)
Top Results From Across the Web
NXcustom for NX11.0 (NX110custom) - Siemens Communities
The environment variable UGII_CUSTOM_DIRECTORY_FILE is being set in Windows for "C:\Program Files\Fibersim 14.1.0\custom_dirs.dat". In the NX110env.dat file ...
Read more >The ultimate migration guide to angular-eslint, ESLint and Nx 11
Let's explore different workspace configurations and discuss a few caveats. This guide includes options to use NPM, PNPM, or Yarn, Jest or Karma ......
Read more >NX default preferences — Engineering Computer Network
The default load assembly option is to look for the parts in the same folder as the assembly, but to work, load assembly...
Read more >Configure RADIUS and TACACS+ for GUI and CLI ... - Cisco
This document describes how to configure a 9800 Wireless LAN Controllers ... In case you have multiple RADIUS servers that can be used...
Read more >Jest finds tests but doesn't collect coverage - Stack Overflow
The quick fix I said in my comment, using --watchAll instead, eg: react-scripts test --coverage --watchAll . Just for future reference, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Please reconsider discussion about this. Not having to copy/paste huge chunk of configuration to change only one parameter is kind of big deal that was resolved in Angular CLI.
@vsavkin Running the command twice will not solved this. Since fileReplacements behavior change in Angular 11 and not longer replace file not imported in code we have to rely on “assets” override. Which can’t be override in NX without multi-configuration so we are stuck with copy/paste of every configuration.
I’v been watching this issue for some time and I would like to second the opinion by @chrisfitz & @henry-martinez on this topic.
@vsavkin has been pretty clear about this topic:
What gives me hope is this:
The proposed workaround does not fit the problem. It’s about the configuration composition feature and not about running multiple builds. We use this feature extensively for our enterprise client and it’s the official suggestion by Angular:
via https://angular.io/guide/i18n
This will take the production config and puts the partial config for the locale
fr
on top of it. This is clearly not “building twice”.Workaround: We are also forced to use ng directly as nx chose to break this behavior. Expected Behavior: nx should reflect the configuration composition from the Angular CLI