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

WebStorm: 'No options' displayed when using generators #2392

Closed
scomans opened this issue Feb 4, 2025 · 26 comments · Fixed by #2407
Closed

WebStorm: 'No options' displayed when using generators #2392

scomans opened this issue Feb 4, 2025 · 26 comments · Fixed by #2407
Labels
type: bug Something isn't working

Comments

@scomans
Copy link

scomans commented Feb 4, 2025

Current Behavior

When attempting to use any generator using the interface, WebStorm will only display "No options".

Expected Behavior

The nx generate UI should display the appropriate list of options for the selected generator.

Failure Logs / Images / Videos

Image
daemon.log
idea.log

Environment

Node           : 22.13.1
OS             : win32-x64
Native Target  : x86_64-windows (Windows 11)
pnpm           : 10.1.0
Webstorm       : Build #WS-243.23654.157, built on January 23, 2025

nx                     : 20.4.0
@nx/js                 : 20.4.0
@nx/jest               : 20.4.0
@nx/eslint             : 20.4.0
@nx/workspace          : 20.4.0
@nx/angular            : 20.4.0
@nx/devkit             : 20.4.0
@nx/eslint-plugin      : 20.4.0
@nx/module-federation  : 20.4.0
@nx/nest               : 20.4.0
@nx/node               : 20.4.0
@nx/playwright         : 20.4.0
@nx/plugin             : 20.4.0
@nx/vite               : 20.4.0
@nx/web                : 20.4.0
@nx/webpack            : 20.4.0
typescript             : 5.7.3
---------------------------------------
Community plugins:
@fortawesome/angular-fontawesome : 1.0.0
@jsverse/transloco               : 7.5.1
@ngneat/tailwind                 : 7.0.3
@rx-angular/cdk                  : 19.1.0
@rx-angular/template             : 19.2.1
apollo-angular                   : 8.0.1
ng-apexcharts                    : 1.15.0
ng-zorro-antd                    : 19.0.2
ngx-matomo-client                : 7.0.1
ngxtension                       : 4.2.1
---------------------------------------
Local workspace plugins:
         @i40mp/scripts
         @i40mp/generators
@MaxKless
Copy link
Collaborator

MaxKless commented Feb 4, 2025

Huh, that's weird. It looks like the request goes through without erroring, but still this happens.
Can you please let me know your version of Nx Console?

@scomans
Copy link
Author

scomans commented Feb 4, 2025

Huh, that's weird. It looks like the request goes through without erroring, but still this happens. Can you please let me know your version of Nx Console?

1.35.1

@MaxKless
Copy link
Collaborator

MaxKless commented Feb 4, 2025

Okay that's good. Does the same happen in other repositories? Or just in this one?

@scomans
Copy link
Author

scomans commented Feb 4, 2025

I have tried 3 other repos, each with a different version of NX installed, but they all have the same problem. My colleague is having the same problems on his PC with a fairly similar setup.

@MaxKless
Copy link
Collaborator

MaxKless commented Feb 4, 2025

This is weird, I can't repro it on my windows machine. Could you provide a minimal reproduction where it's broken for you? Then I can clone it and try there.

@scomans
Copy link
Author

scomans commented Feb 4, 2025

I just create a new NX project with pnpm dlx create-nx-workspace wich resulted in the same problem. So I guess it's a problem with my machine/WebStorm setup.

pnpm dlx create-nx-workspace
Packages: +56
++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Progress: resolved 56, reused 55, downloaded 1, added 56, done

 NX   Let's create a new workspace [https://nx.dev/getting-started/intro]

√ Where would you like to create your workspace? · org
√ Which stack do you want to use? · angular
√ Integrated monorepo, or standalone project? · integrated
√ Application name · org
√ Which bundler would you like to use? · esbuild
√ Default stylesheet format · scss
√ Do you want to enable Server-Side Rendering (SSR) and Static Site Generation (SSG/Prerendering)? · No
√ Test runner to use for end to end (E2E) tests · none
√ Which CI provider would you like to use? · github

 NX   Creating your v20.4.0 workspace.

✔ Installing dependencies with pnpm
✔ Successfully created the workspace: org.
✔ Nx Cloud has been set up successfully
✔ CI workflow has been generated successfully

@MaxKless
Copy link
Collaborator

MaxKless commented Feb 4, 2025

I did exactly that and it still works... Can you post a repo where it's broken to github so I can clone it and have a look? Maybe something is subtly different.

@scomans
Copy link
Author

scomans commented Feb 4, 2025

@saeidi-dev
Copy link

I am experiencing the exact same issue. When using any generator in WebStorm, the interface only displays the message "No options," and the options related to the selected generator do not appear. This problem is affecting my workflow, and I hope a solution can be found.

@MaxKless
Copy link
Collaborator

MaxKless commented Feb 6, 2025

Maybe we can narrow it down even more. In the same project in vscode, does the same happen? I'm trying to differentiate between an issue in your node/nx/local setup and an issue in your webstorm/intellij setup

@mayrmax
Copy link

mayrmax commented Feb 10, 2025

Hello @MaxKless, i have the same issue as well. For me it is only broken in Webstorm but works as expected in vs code. If you need any other information let me know!

@MaxKless
Copy link
Collaborator

If any of you could also post an idea.log or sections of it, that would be great @mayrmax @saeidi-dev . I didn't see any errors in the original one and can't reproduce :/

@mayrmax
Copy link

mayrmax commented Feb 11, 2025

Does this help:
2025-02-11 11:40:12,705 [6725445] INFO - #dev.nx.console.generate.ui.file.NxGenerateUiFile - posting message {"payloadType":"config","payload":{"enableTaskExecutionDryRunOnChange":true}} 2025-02-11 11:40:12,751 [6725491] INFO - #dev.nx.console.generate.ui.file.V2NxGenerateUiFile - received message GenerateUiFormInitOutputMessage(payloadType=output-init) 2025-02-11 11:40:12,763 [6725503] INFO - #dev.nx.console.generate.ui.file.NxGenerateUiFile - posting message {"payloadType":"generator","payload":{"collectionName":"@nx/angular","generatorName":"library","description":"Creates an Angular library.","options":[],"context":{"project":null,"projectName":null,"directory":"\\libs","normalizedDirectory":"libs","path":null,"fixedFormValues":null,"prefillValues":{"cwd":"\\libs"},"nxVersion":{"minor":3,"major":20,"full":"20.3.1"}}}} 2025-02-11 11:40:12,835 [6725575] INFO - #dev.nx.console.generate.ui.file.NxGenerateUiFile - posting message {"payloadType":"banner","payload":{"message":"You have uncommitted changes in your workspace. We recommend that you commit any previous changes before running a generator, so that you can easily undo changes if necessary.","type":"warning"}}

@MaxKless
Copy link
Collaborator

No it would be a bit further above where the options are being requested from the nxls. Maybe you'll have to enable trace logs.
Go to Help > Diagnostic Tools > Debug Log Settings... and then insert #dev.nx.console:trace.

@saeidi-dev
Copy link

Is this helpful?

2025-02-11 15:14:02,462 [169035063] INFO - #dev.nx.console.generate.ui.file.V2NxGenerateUiFile - received message GenerateUiFormInitOutputMessage(payloadType=output-init)
2025-02-11 15:14:02,465 [169035066] INFO - #dev.nx.console.generate.ui.file.NxGenerateUiFile - posting message {"payloadType":"styles","payload":{"backgroundColor":"#3c3f41","foregroundColor":"#FFFFFF","mutedForegroundColor":"#787878","primaryColor":"#365880","errorColor":"#8b3c3c","fieldBackgroundColor":"#45494a","fieldBorderColor":"#646464","selectFieldBackgroundColor":"#3c3f41","activeSelectionBackgroundColor":"#4b6eaf","focusBorderColor":"#3d6185","badgeBackgroundColor":"#3c3f41","bannerWarningBackgroundColor":"#ac7920","bannerTextColor":"#bbbbbb","separatorColor":"#464646","fieldNavHoverColor":"#2e3133","scrollbarThumbColor":"#3c3f41","fontFamily":"'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans','Helvetica Neue', sans-serif;","fontSize":"13px"}}
2025-02-11 15:14:02,465 [169035066] INFO - #dev.nx.console.generate.ui.file.NxGenerateUiFile - posting message {"payloadType":"config","payload":{"enableTaskExecutionDryRunOnChange":true}}
2025-02-11 15:14:02,466 [169035067] FINER - #dev.nx.console.nxls.NxlsWrapper - Sending request to nxls: nx/transformedGeneratorSchema (GeneratorSchema(collectionName=@nx/angular, generatorName=component, description=Generate an Angular)
2025-02-11 15:14:02,467 [169035068] FINER - #dev.nx.console.nxls.NxlsWrapper - Sending request to nxls: nx/startupMessage (GeneratorSchema(collectionName=@nx/angular, generatorName=component, description=Generate an Angular)
2025-02-11 15:14:02,506 [169035107] FINER - #dev.nx.console.nxls.NxlsWrapper - Result from nxls: GeneratorSchema(collectionName=@nx/angular, generatorName=component, description=Generate an Angular
2025-02-11 15:14:02,506 [169035107] INFO - #dev.nx.console.generate.ui.file.NxGenerateUiFile - posting message {"payloadType":"generator","payload":{"collectionName":"@nx/angular","generatorName":"component","description":"Generate an Angular Component.","options":[],"context":{"project":"formation","projectName":null,"directory":"\features\formation\src\lib\organization-structure","normalizedDirectory":"features/formation/src/lib/organization-structure","path":null,"fixedFormValues":null,"prefillValues":{"cwd":"\features\formation\src\lib\organization-structure"},"nxVersion":{"minor":3,"major":20,"full":"20.3.3"}}}}
2025-02-11 15:14:02,659 [169035260] FINER - #dev.nx.console.nxls.NxlsWrapper - Result from nxls: GenerateUiStartupMessageDefinition(message=You have uncommitted changes in your workspace. We recomm
2025-02-11 15:14:02,659 [169035260] INFO - #dev.nx.console.generate.ui.file.NxGenerateUiFile - posting message {"payloadType":"banner","payload":{"message":"You have uncommitted changes in your workspace. We recommend that you commit any previous changes before running a generator, so that you can easily undo changes if necessary.","type":"warning"}}

@MaxKless
Copy link
Collaborator

It's crazy that there are just no options at all. Here is a locally built version that adds a bunch more logs to the generator options request. If you install it locally and send me the logs again when you see this issue, maybe it will tell us more :) C

nx-console-0.0.1.zip

Instructions for installing:
Go to Settings -> Plugins -> ⚙️ and select Install Plugin from Disk

image

@scomans
Copy link
Author

scomans commented Feb 11, 2025

idea.log

@MaxKless
Copy link
Collaborator

hmmm interesting, the options request doesn't look like it's called at all for you. Here's a version with an attempted fix and different logging, can you try it out @scomans ?

nx-console-0.0.1.zip

@scomans
Copy link
Author

scomans commented Feb 12, 2025

It still doesn't show any options 😕

idea.log

@dmantsevich
Copy link

dmantsevich commented Feb 14, 2025

The same problem...

Image

Image

@irowbin
Copy link

irowbin commented Feb 17, 2025

Exactly the same issue. It shows no options on a Windows machine with a fresh Webstorm.

@LitVi74
Copy link

LitVi74 commented Feb 17, 2025

Also. I recently reinstalled the OS. Tried both on my home PC and on my work PC.

Reproduction steps:
Installing WebStorm (my version is 2024.3.2.1)
Installing node (my version is 22.13.1)
Installing the Nx Console package (my version is 1.35.1)

Personally, I have the default WebStorm settings

@mrmemar
Copy link

mrmemar commented Feb 18, 2025

I have same problem too

@MaxKless
Copy link
Collaborator

Hey! I was able to repro with node 22, that was the missing piece. I'm investigating today and hope I'll have a fix asap. Thanks for the reports, everyone!!

@MaxKless
Copy link
Collaborator

Hey everyone! This fixed it on my machine. Can any of you install it locally and try it out?
I'll make a PR and release a new version soon.

nx-console-0.0.5.zip

@MaxKless MaxKless linked a pull request Feb 18, 2025 that will close this issue
@irowbin
Copy link

irowbin commented Feb 19, 2025

After installing the mentioned zip file, I confirm that the options are returning when using Node.js v22.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants