Using custom builder with workspace.json breaks the nx command
See original GitHub issueCurrent Behavior
When using @angular-builders/custom-webpack
with workspace.json
setup, providing builder
option with @angular-builders/custom-webpack
breaks the nx ...
commands.
Expected Behavior
Nx command should produces same results, no matter which builder I use.
Steps to Reproduce
- Create new Nx environment that uses
workspace.json
. - Install
@nrwl/angular
with@angular-builders/custom-webpack
as dev-dependency. - Add new angular application with
nx generate ...
. - Update
workspace.json
files as below:
...
"architect": {
"build": {
"builder": "@angular-builders/custom-webpack:browser",
...
}
}
...
- Save and run
nx build
command.
In above steps, if you change serve.builder
field, instead of build.builder
, it will break nx serve
command.
Failure Logs
Using nx build
command:
> nx run test-app:build
Cannot determine versions of "@angular/cli".
This likely means your local installation is broken. Please reinstall your packages.
Using nx serve
command:
> nx run test-app:serve
Cannot determine versions of "@angular/cli".
This likely means your local installation is broken. Please reinstall your packages.
Additionally, using ng serve
(or ng build
) command:
> ng serve
The serve command requires to be run in an Angular project, but a project definition could not be found.
Environment
@nrwl/angular : 9.5.1
@nrwl/cli : 9.5.1
@nrwl/cypress : 9.5.1
@nrwl/eslint-plugin-nx : 9.5.1
@nrwl/express : Not Found
@nrwl/jest : 9.5.1
@nrwl/linter : 9.5.1
@nrwl/nest : 9.5.1
@nrwl/next : Not Found
@nrwl/node : 9.5.1
@nrwl/react : Not Found
@nrwl/schematics : Not Found
@nrwl/tao : 9.5.1
@nrwl/web : Not Found
@nrwl/workspace : 9.5.1
typescript : 3.8.3
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Which builder to use when using nx with angular.json
It allows you to build your Angular application to a build artifact that can be hosted online. There are some key differences: Supports...
Read more >nrwl-nx/community - Gitter
i'm using the following command node --inspect-brk ./node_modules/@nrwl/cli/bin/nx.js test libname . if i convert my workspace to an angular-cli powered one, ...
Read more >Project Configuration - Nx
json files are located in each project's folder. Nx merges the two files to get each project's configuration. The following configuration creates build...
Read more >Angular CLI and Nx — Why?. In this blog post, I'll present a…
In this blog post, I'll present a comparison of both the Angular CLI and the Nx CLI and present some evaluations on the...
Read more >How to create a workspace generator as a library in Nx ...
Enters Workspace Generators! With workspace generators you can build your own generators and run them like this: npx nx workspace-generator ...
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
I’m using
In the same project with Nx 11.3.x and not seeing problems, so it looks like Nx was indeed fixed to not break in this configuration.
Closing as resolved