banner
leoking

leoking

前端开发者
tg_channel

Installing and using nvm on Mac

In actual work, nvm is used to manage node packages. Here are some records for your reference.

1. Uninstall existing node and node modules before installation (clean up the environment)

2. Install nvm (the most important part)

Install nvm locally using the gitee mirror

3. Configure nvm environment variables

After step 2, nvm is temporarily unavailable. When the terminal is closed and reopened, nvm is still not available. You need to add nvm environment variables. Enter the .bash_profile file to set the environment variables. If this file does not exist,

If you are using the zsh environment (like me and most of my colleagues), you also need to separately set the .zshrc file.

4. Check the installation

After step 3, whether it is a new command line window or the current one, you can check the installation status of nvm with command -v nvm.

Here are some examples

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.