Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
s0l4r opened this issue Dec 1, 2021 · 2 comments
Open
Assignees
Labels
good first issue Good for newcomers

Comments

@s0l4r
Copy link

s0l4r commented Dec 1, 2021

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
Copy link
Author

s0l4r commented Dec 7, 2021

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.

@NathanWalker
Copy link
Member

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 NathanWalker self-assigned this Dec 30, 2021
@NathanWalker NathanWalker added the good first issue Good for newcomers label Dec 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants