From b23b7f25c9034b257bd082be5ec63db29d2f49a6 Mon Sep 17 00:00:00 2001 From: MaxKless <34165455+MaxKless@users.noreply.github.com> Date: Wed, 18 Oct 2023 21:29:54 +0200 Subject: [PATCH] docs(core): add nx console troubshooting guide (#19715) --- docs/generated/manifests/menus.json | 24 +++++++++++++++ docs/generated/manifests/nx.json | 30 +++++++++++++++++++ docs/generated/manifests/tags.json | 7 +++++ docs/map.json | 6 ++++ .../shared/recipes/console-troubleshooting.md | 17 +++++++++++ docs/shared/reference/sitemap.md | 1 + 6 files changed, 85 insertions(+) create mode 100644 docs/shared/recipes/console-troubleshooting.md diff --git a/docs/generated/manifests/menus.json b/docs/generated/manifests/menus.json index dfd9a243e6..12abb47bc4 100644 --- a/docs/generated/manifests/menus.json +++ b/docs/generated/manifests/menus.json @@ -2363,6 +2363,14 @@ "isExternal": false, "children": [], "disableCollapsible": false + }, + { + "name": "Troubleshooting", + "path": "/recipes/nx-console/console-troubleshooting", + "id": "console-troubleshooting", + "isExternal": false, + "children": [], + "disableCollapsible": false } ], "disableCollapsible": false @@ -4081,6 +4089,14 @@ "isExternal": false, "children": [], "disableCollapsible": false + }, + { + "name": "Troubleshooting", + "path": "/recipes/nx-console/console-troubleshooting", + "id": "console-troubleshooting", + "isExternal": false, + "children": [], + "disableCollapsible": false } ], "disableCollapsible": false @@ -4133,6 +4149,14 @@ "children": [], "disableCollapsible": false }, + { + "name": "Troubleshooting", + "path": "/recipes/nx-console/console-troubleshooting", + "id": "console-troubleshooting", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, { "name": "Other", "path": "/recipes/other", diff --git a/docs/generated/manifests/nx.json b/docs/generated/manifests/nx.json index c81ef85f98..2e73634977 100644 --- a/docs/generated/manifests/nx.json +++ b/docs/generated/manifests/nx.json @@ -2945,6 +2945,16 @@ "isExternal": false, "path": "/recipes/nx-console/console-shortcuts", "tags": ["integrate-with-editors"] + }, + { + "id": "console-troubleshooting", + "name": "Troubleshooting", + "description": "", + "file": "shared/recipes/console-troubleshooting", + "itemList": [], + "isExternal": false, + "path": "/recipes/nx-console/console-troubleshooting", + "tags": ["integrate-with-editors"] } ], "isExternal": false, @@ -5089,6 +5099,16 @@ "isExternal": false, "path": "/recipes/nx-console/console-shortcuts", "tags": ["integrate-with-editors"] + }, + { + "id": "console-troubleshooting", + "name": "Troubleshooting", + "description": "", + "file": "shared/recipes/console-troubleshooting", + "itemList": [], + "isExternal": false, + "path": "/recipes/nx-console/console-troubleshooting", + "tags": ["integrate-with-editors"] } ], "isExternal": false, @@ -5155,6 +5175,16 @@ "path": "/recipes/nx-console/console-shortcuts", "tags": ["integrate-with-editors"] }, + "/recipes/nx-console/console-troubleshooting": { + "id": "console-troubleshooting", + "name": "Troubleshooting", + "description": "", + "file": "shared/recipes/console-troubleshooting", + "itemList": [], + "isExternal": false, + "path": "/recipes/nx-console/console-troubleshooting", + "tags": ["integrate-with-editors"] + }, "/recipes/other": { "id": "other", "name": "Other", diff --git a/docs/generated/manifests/tags.json b/docs/generated/manifests/tags.json index 862aef2da4..588ae56ffe 100644 --- a/docs/generated/manifests/tags.json +++ b/docs/generated/manifests/tags.json @@ -412,6 +412,13 @@ "id": "console-shortcuts", "name": "Keyboard Shortcuts", "path": "/recipes/nx-console/console-shortcuts" + }, + { + "description": "", + "file": "shared/recipes/console-troubleshooting", + "id": "console-troubleshooting", + "name": "Troubleshooting", + "path": "/recipes/nx-console/console-troubleshooting" } ], "use-task-executors": [ diff --git a/docs/map.json b/docs/map.json index 268f44c318..3c53efe95d 100644 --- a/docs/map.json +++ b/docs/map.json @@ -1138,6 +1138,12 @@ "id": "console-shortcuts", "tags": ["integrate-with-editors"], "file": "shared/recipes/console-shortcuts" + }, + { + "name": "Troubleshooting", + "id": "console-troubleshooting", + "tags": ["integrate-with-editors"], + "file": "shared/recipes/console-troubleshooting" } ] }, diff --git a/docs/shared/recipes/console-troubleshooting.md b/docs/shared/recipes/console-troubleshooting.md new file mode 100644 index 0000000000..fe223d087f --- /dev/null +++ b/docs/shared/recipes/console-troubleshooting.md @@ -0,0 +1,17 @@ +# Nx Console Troubleshooting + +## VSCode + nvm Issues + +VSCode loads a version of Node when it starts. It can use versions set via [`nvm`](https://github.com/nvm-sh/nvm) but there are some caveats. + +- If you've installed Node outside of `nvm` (for example using the Node installer or `brew` on Mac), VSCode will always use that version. You can check by running `nvm list` and looking for a `system` alias. To enable VSCode to pick up your `nvm` version, make sure to uninstall the version of Node that was installed outside of `nvm`. +- VSCode will load the `default` alias from `nvm` at startup. You can set it by running `nvm alias default [version]`. The `default` alias needs to be set in your OS' default terminal for VSCode to pick it up. Setting it in a VSCode-integrated terminal won't persist after it's closed. Similarly, setting it in a third-party app like iTerm won't influence VSCode by default. +- VSCode only loads the `default` version when the app is first started. This means that in order to change it, you need to close all VSCode windows and restart the app - running `Reload Window` won't work. +- If you work with lots of different Node versions, there are various VSCode extensions available to dynamically run `nvm use` whenever you open a new integrated terminal. Search for `nvm`. +- You can set a static version by using a launch configuration with `runtimeVersion` set. Refer to [this guide](https://code.visualstudio.com/docs/nodejs/nodejs-debugging#_multi-version-support). + +We try to make noticing discrepancies easier by showing you the currently loaded Node version on startup. You can disable this in the Nx Console settings. + +## JetBrains WSL Support + +The Node interpreter under Languages & Frameworks > Node.js needs to be configured to use the Node executable within the WSL distribution. You can read more on the [official Jetbrains docs](https://www.jetbrains.com/help/webstorm/how-to-use-wsl-development-environment-in-product.html#ws_wsl_node_interpreter_configure). diff --git a/docs/shared/reference/sitemap.md b/docs/shared/reference/sitemap.md index 01c613023d..0506b967c9 100644 --- a/docs/shared/reference/sitemap.md +++ b/docs/shared/reference/sitemap.md @@ -191,6 +191,7 @@ - [Add Dependency Command](/recipes/nx-console/console-add-dependency-command) - [Project Pane](/recipes/nx-console/console-project-pane) - [Keyboard Shortcuts](/recipes/nx-console/console-shortcuts) + - [Troubleshooting](/recipes/nx-console/console-troubleshooting) - [Other](/recipes/other) - [Rescope Packages from @nrwl to @nx](/recipes/other/rescope) - [Showcase](/showcase)