当前位置:网站首页>Node installation and environment configuration
Node installation and environment configuration
2022-08-02 06:54:00 【m0_67392811】
NODE installation
①Node download After entering the node official website, choose to download the corresponding version Node.js;
I am windows64 so I downloaded the Windows64 version, the first option is the stable version, which most people will choose to use; the second option is the latest version of the current node update;

2 After downloading the node installation package, install it. Here you select your node installation location. The default is the c drive. You can modify it according to your own ideas; then click Next until the installation is complete.

③ Then you find run or win+r on the computer to open the command box and enter the cmd command to open the command window.


Enter the node -v command to see the version information displayed, and enter npm -v to output the corresponding version information.That proves that you have installed it and can use it.

Environment Configuration
Now your global repository is installed under the c drive, which can be viewed through the npm list -global command; so when you use npm to install the global module, the files under the c drive will be installedfolder, this will make your c drive data huge, so we can modify the default storage address; but if your c drive itself is relatively large and you don't care about the extra data stored, you can ignore this step.
Create two new folders under the folder where you installed node; node_cache (cache folder) node_global (global warehouse folder)

Then enter the command line
npm config set prefix "node_global address"
npm config set cache "address of node_cache"

At this time, your global warehouse address and cache address have been modified;
You can use the command line to install something to test it; for example, if I install webpack globally, you will see a webpack folder under node_global, and any modules you install globally can be placed in this folderturn up.

Next, you need to configure the environment, right-click on my computer-properties-find the advanced property settings, click the advanced tab, there is an environment variable in the lower right corner;


Open the path column of the user variable and change the address of npm to your global repository address


Then edit the system variable, find the path column, and modify the node column to the node_modules folder under the global address


At this point, the installation of node and the configuration of environment variables are over, and then you can use your node to install modules.
Let me introduce myself first. The editor graduated from Shanghai Jiaotong University in 2013. I worked in a small company and went to big factories such as Huawei and OPPO. I joined Alibaba in 2018, until now.I know that most junior and intermediate java engineers want to upgrade their skills, they often need to explore their own growth or sign up to study, but for training institutions, the tuition fee is nearly 10,000 yuan, which is really stressful.Self-learning that is not systematic is very inefficient and lengthy, and it is easy to hit the ceiling and the technology stops.Therefore, I collected a "full set of learning materials for java development" for everyone. The original intention is also very simple. I hope to help friends who want to learn by themselves but don't know where to start, and at the same time reduce everyone's burden.Add the business card below to get a full set of learning materials
边栏推荐
猜你喜欢

MySQL union query (multi-table query)

字节面试题:如何保证缓存和数据库的一致性

Double for loop case (use js jiujiu printing multiplication table)

HCIP BGP Comprehensive Experiment Establishing peers, route reflectors, federation, route announcement and aggregation

Nodejs安装教程

深度学习——CNN实现MNIST手写数字的识别

跨桌面端Web容器演进

node安装及环境变量配置

mysql索引失效的常见9种原因详解

上海交大牵手淘宝成立媒体计算实验室:推动视频超分等关键技术发展
随机推荐
字节面试题:如何保证缓存和数据库的一致性
Ant three sides: MQ message loss, duplication, backlog problem, what are the solutions?
leetcode solves the linked list merge problem in one step
Analysis of port 9848 error at startup of Nacos client (non-version upgrade problem)
HCIP第十七天
leetcode-338.比特位计数
Luogu mini game Daquan (everyone who uses Luogu must know)
淘系资深工程师整理的300+项学习资源清单(2021最新版)
MySql COUNT statistics function explanation
VMTK环境配置记录
路由规划中级篇
[Cartoon] 2021 full score programmer behavior comparison table (latest version)
MySQL高阶---存储引擎、索引、锁
5款经典代码阅读器的使用方案对比
人工神经网络
selenium + robotframework的运行原理
国际顶会OSDI首度收录淘宝系统论文,端云协同智能获大会主旨演讲推荐
MySQL 5.7 安装教程(全步骤、保姆级教程)
Features and installation of non-relational database MongoDB
Node installation and configuration of environment variables