nrwl / nx-console

Nx Console is the user interface for Nx & Lerna.
https://nx.dev
MIT License
1.31k stars 213 forks source link

Nx Console broken on JetBrains + WSL #1888

Open MaxKless opened 1 year ago

MaxKless commented 1 year ago

I've muddled up some issues so I will move this discussion here @ericjeker. I will hide the discussion in other issues to keep things clean.

image image image
MaxKless commented 1 year ago

Sorry again for the confusion with the differen WSL issues. Let's continue here.

@ericjeker it looks like an issue with the wsl node interpreter - have you gone through the WSL guide, especially this last section? https://www.jetbrains.com/help/webstorm/how-to-use-wsl-development-environment-in-product.html#ws_wsl_node_interpreter_configure

Maybe the wrong node interpreter is configured?

ericjeker commented 1 year ago

Hi Max, yes I actually tried with both the Window interpreter and WSL interpreter but none were working.

I tried with nx-example as suggested in the other thread but same result with the 0.0.1 version you provided in the other thread. But then I updated back to 1.13.1 and restarted my IDE and now I can display the Nx Console and run the Deps Graph but not the commands.

I am wondering if it's because I use Volta?

I tried also to run the View Full Graph and I got this error in the 0.0.1: image

When I try to run a command I got this error: image

And in the log, I found out there are some weird paths. That node_modules directory doesn't exist at all. Not sure how this path is generated?

2023-09-15T17:28:18.832Z - Generating graph with command: `npx nx dep-graph --file ./..\..\..\..\Windows\node_modules\.cache\nx\nx-console-project-graph\project-graph.html`

I feel like there is a lot of confusion between the Windows path and WSL path. Also the usage of slash and backslash seems a bit random.

dev-seahouse commented 1 year ago
image

it looks like nx console coudn't recognize wsl path when running serve, generators and project graph do work though

leonardoldr23 commented 11 months ago

To sum up at the discussion: The plugin seems to ignore the Node Interpreter configured at the IDE's config "Language and Frameworks > Node.js > Node Interpreter", because it only works from the UI if you have nodejs on the windows itself.

BaronVonPerko commented 5 months ago

I'm on 2024.1.3 and after updating my node interpreter to the WSL one, restarting the IDE fixed the Nx Console plugin.

MaxKless commented 5 months ago

can you try again as well @leonardoldr23 @dev-seahouse @ericjeker? The Node Interpreter should be taken into account by Nx Console