nx
nx copied to clipboard
Not possible to use Angular builders from local nx-plugin
Current Behavior
It is not possible to use Angular builder from workspace local nx-plugin:
- Defining builder (without
"cli": "nx") fails withCannot find module '@builder-repro/nx-plugin/package.json' - Using executor (with
"cli": "nx") with scheduleTarget fails withCannot find module '@builder-repro/nx-plugin/package.json' - Using executor to invoke builder directly is not possible because of lack of interoperability between nx
ExecutorContextand AngularBuilderContext.
Expected Behavior
It would be great having possibility to invoke/execute Angular builders from local nx-plugin.
Steps to Reproduce
I've created fresh repository with all 3 scenarios reproduced: https://github.com/minijus/builder-repro.
3 executor targets are defined on test-app: https://github.com/minijus/builder-repro/blob/main/apps/test-app/project.json#L53-L88
Failure Logs

Environment
Node : 16.16.0
OS : darwin x64
npm : 8.16.0
nx : 14.5.4
@nrwl/angular : 14.5.4
@nrwl/cypress : 14.5.4
@nrwl/detox : Not Found
@nrwl/devkit : 14.5.4
@nrwl/eslint-plugin-nx : 14.5.4
@nrwl/express : Not Found
@nrwl/jest : 14.5.4
@nrwl/js : 14.5.4
@nrwl/linter : 14.5.4
@nrwl/nest : Not Found
@nrwl/next : Not Found
@nrwl/node : Not Found
@nrwl/nx-cloud : Not Found
@nrwl/nx-plugin : 14.5.4
@nrwl/react : Not Found
@nrwl/react-native : Not Found
@nrwl/schematics : Not Found
@nrwl/storybook : 14.5.4
@nrwl/web : 14.5.4
@nrwl/workspace : 14.5.4
typescript : 4.7.4
---------------------------------------
Community plugins:
It would be nice if the @nrwl/* executors consistently used the same context (Executor or Builder) for all tasks, rather than using ExecutorContext for most and BuilderContext for Angular tasks (even the nrwl/angular custom ones).