docs(core): add nx console troubshooting guide (#19715)

This commit is contained in:
MaxKless 2023-10-18 21:29:54 +02:00 committed by GitHub
parent e20f379414
commit b23b7f25c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 85 additions and 0 deletions

View File

@ -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",

View File

@ -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",

View File

@ -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": [

View File

@ -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"
}
]
},

View File

@ -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).

View File

@ -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)