nx-extensions icon indicating copy to clipboard operation
nx-extensions copied to clipboard

Stencil: Adding output targets requires all framework targets (angular, react vue) to be installed

Open jase88 opened this issue 3 years ago • 2 comments

Describe the bug If adding an output target to a library all supported output targets need to be installed. This is probably how the nxext code is implemented, so that it requires to have everything installed.

To Reproduce

  • create a new stencil library (nx g @nxext/stencil:lib web-components --buildable=true --style=scss) within an Angular workspace
  • add output target for angular for that library (nx g @nxext/stencil:add-outputtarget web-components --outputType=angular) error on execution:
Cannot find module '@nx-plus/vue'
Require stack:
- C:\src\node_modules\@nxext\stencil\src\generators\add-outputtarget\lib\vue.js
- C:\src\node_modules\@nxext\stencil\src\generators\add-outputtarget\add-outputtarget.js
- C:\src\node_modules\@nrwl\tao\src\shared\workspace.js

after manually installing @nx-plus/vue I still get an error:

Cannot find module '@nrwl/react'
Require stack:
- C:\src\node_modules\@nxext\stencil\src\generators\add-outputtarget\lib\react.js
- C:\src\node_modules\@nxext\stencil\src\generators\add-outputtarget\add-outputtarget.js

Expected behavior It should not be required to have everything installed, if only one part of the generator is used

jase88 avatar Dec 06 '21 20:12 jase88

@jase88 yes that's something I already working on.

DominikPieper avatar Dec 08 '21 08:12 DominikPieper

This is still an issue - any update on a fix?

edwardwilson avatar Apr 04 '22 17:04 edwardwilson