xplat icon indicating copy to clipboard operation
xplat copied to clipboard

[Bug] nx generate @nstudio/angular:component with Electron target freezes

Open s0l4r opened this issue 3 years ago • 2 comments

Possible bug detected..

When running this command all is ok (NS and Web):

nx generate @nstudio/angular:component --name=product --createBase --platforms=nativescript,web--dry-run

CREATE libs/xplat/features/src/lib/ui/base/product.base-component.ts
CREATE libs/xplat/nativescript/features/src/lib/ui/components/product/product.component.html
CREATE libs/xplat/nativescript/features/src/lib/ui/components/product/product.component.ts
CREATE libs/xplat/web/features/src/lib/ui/components/product/product.component.html
CREATE libs/xplat/web/features/src/lib/ui/components/product/product.component.ts
UPDATE libs/xplat/features/src/lib/ui/base/index.ts
UPDATE libs/xplat/nativescript/features/src/lib/ui/components/index.ts
UPDATE libs/xplat/web/features/src/lib/ui/components/index.ts
UPDATE angular.json

But when running this with Electron as well, it seems to get stuck in an endless loop somewhere (CPU goes to 100%):

nx generate @nstudio/angular:component --name=product --createBase --platforms=nativescript,web,electron --dry-run

The problems seems to be in the target platform Electron:

nx generate @nstudio/angular:component --name=product --createBase --platforms=electron --dry-run

My packages and versions:

├── @angular-devkit/[email protected]
├── @angular-eslint/[email protected]
├── @angular-eslint/[email protected]
├── @angular-eslint/[email protected]
├── @angular/[email protected]
├── @angular/[email protected]
├── @angular/[email protected]
├── @angular/[email protected]
├── @angular/[email protected]
├── @angular/[email protected]
├── @angular/[email protected]
├── @angular/[email protected]
├── @angular/[email protected]
├── @angular/[email protected]
├── @angular/[email protected]
├── @eversec/[email protected] -> ./libs/xplat/scss/src
├── @nativescript/[email protected]
├── @nativescript/[email protected]
├── @nativescript/[email protected]
├── @nativescript/[email protected]
├── @nativescript/[email protected]
├── @ngtools/[email protected]
├── @ngx-translate/[email protected]
├── @ngx-translate/[email protected]
├── @nrwl/[email protected]
├── @nrwl/[email protected]
├── @nrwl/[email protected]
├── @nrwl/[email protected]
├── @nrwl/[email protected]
├── @nrwl/[email protected]
├── @nrwl/[email protected]
├── @nrwl/[email protected]
├── @nrwl/[email protected]
├── @nstudio/[email protected]
├── @nstudio/[email protected]
├── @nstudio/[email protected]
├── @nstudio/[email protected]
├── @nstudio/[email protected]
├── @nstudio/[email protected]
├── @nstudio/[email protected]
├── @nstudio/[email protected]
├── @nstudio/[email protected]
├── @parcel/node-addon-api@ extraneous
├── @types/[email protected]
├── @types/[email protected]
├── @typescript-eslint/[email protected]
├── @typescript-eslint/[email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]

s0l4r avatar Dec 01 '21 08:12 s0l4r

After playing around a bit with Xplat, my understanding is that this should not be possible to run at all, since the web app is running with a target in Electron. Maybe it's a good idea to disable that platform target when generating features and components in Xplat.

s0l4r avatar Dec 07 '21 08:12 s0l4r

Thanks for this note, correct - the component would be generated for the web app since Electron target is just a shell for any web app target in the workspace. Good idea to disable the electron platform when using component generator.

NathanWalker avatar Dec 30 '21 17:12 NathanWalker