Nx Console Troubleshooting
VSCode + nvm Issues
VSCode loads a version of Node when it starts. It can use versions set via nvm but there are some caveats.
- If you've installed Node outside of
nvm(for example using the Node installer orbrewon Mac), VSCode will always use that version. You can check by runningnvm listand looking for asystemalias. To enable VSCode to pick up yournvmversion, make sure to uninstall the version of Node that was installed outside ofnvm. - VSCode will load the
defaultalias fromnvmat startup. You can set it by runningnvm alias default [version]. Thedefaultalias 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
defaultversion 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 - runningReload Windowwon't work. - If you work with lots of different Node versions, there are various VSCode extensions available to dynamically run
nvm usewhenever you open a new integrated terminal. Search fornvm. - You can set a static version by using a launch configuration with
runtimeVersionset. Refer to this guide.
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.