中文 vscode-nvmrc
vscode-nvmrc
is a Visual Studio Code extension that automatically switch Node.js version when a Visual Studio Code window is focused. This is useful when you need to switch between different Node.js versions across multiple Visual Studio Code instances.
-
If a
.nvmrc
file exists in the project root directory, the extension will read the file and switch the Node.js version based on the specified version number when a Visual Studio Code window is focused. -
For Example:
v16.16.0
-
This extension creates a terminal to run nvm use, and it will automatically close the terminal after a few seconds. You can configure whether to automatically close and how many seconds to automatically close in the settings.
When switching between multiple Visual Studio Code instances, the extension will automatically execute nvm use
command. 3.
- Make sure that a valid
.nvmrc
file exists in your project root directory, if the.nvmrc
file does not exist or is invalid, the extension will not work. - If there are multiple projects in the workspace, the
.nvmrc
file in the first project's root directory will be used. - Ensure that NVM is correctly installed on your system and configured with the required Node.js versions.
If you encounter any issues or have any suggestions, please feel free to raise an issue or submit a pull request. We are more than happy to listen to your feedback and contributions.
- Submit an Issue: Issues page in the extension's repository
- Submit a Pull Request: Pull Requests page in the extension's repository
This extension is licensed under the MIT License.