Many video bloggers, when introducing various AI development tools such as cursor, windsurf, or IDEs like vscode, directly explain how to use these tools for AI application development, often neglecting some basic environment configurations.
However, I believe that these basic environment configurations should also be communicated in advance, so that those who have not done any development can better ask AI.
Here, I have set up a teaser in the title; what I want to say is that when we want to smoothly use some development tools to develop various AI applications, we must first install something that all projects will tell you to do, which is to execute commands like npm install XXXX or mnpm XXXX or npx XXXX. Often, when we execute these commands, we encounter errors indicating that the command does not exist. When we start learning from these experts, we often give up due to these errors. In fact, it is because we need to install Node and npm in our local environment in advance. These are two software programs that can be downloaded and installed, and these two are the basic environment preparations that allow us to learn AI applications normally alongside the experts.
So here, I want to teach everyone how to install Node and npm locally. Below are the steps based on the Windows 11 operating system.
Step 1: Visit this link in your browser to download the nvm installation package
https://github.com/coreybutler/nvm-windows/releases
Step 2: Install nvm
After clicking the installation executable, just click next, next, and you can use the default installation paths for Node and npm, or customize the installation path.
Step 3: Get the available Node installation versions
Open the command window in Windows by typing cmd and execute nvm list available.
Step 4: Install Node
You can install based on the version number above; I chose the first one, 23.3.0. Continue by executing nvm install 23.3.0.
Step 5: Use the specified version of Node
Continue by executing nvm use 23.3.0.
At this point, you are almost done. You can verify by using node -v and npm -v. Here, npm is installed together with Node.
Alright, this article mainly shares how to install Node and npm using the nvm Node version management tool. This is one of the essential skills in today's era where everyone can be a programmer and develop AI applications.
If you are unclear about the meanings of cmd, nvm, npm, node, npx mentioned in the article, the simplest way is to ask a large language model (LLM), and it will provide you with a detailed introduction to what they are.
If this article is useful to you, please follow me! I will continue to share useful knowledge and skills related to AI.