node 安装

Last updated on November 22, 2024 pm

🧙 Questions

☄️ Ideas

windows安装

linux安装

sudo yum install npm -y
sudo yum install nodejs -y

linux源码安装

wget https://nodejs.org/dist/v12.18.3/node-v12.18.3-linux-x64.tar.xz
tar -xvJf node-v12.18.3-linux-x64.tar.xz 
mv node-v12.18.3-linux-x64 /data/node

linux 指定版本安装

# 推荐nodejs在18.x以上
curl --silent --location https://rpm.nodesource.com/setup_18.x | sudo bash
sudo yum install nodejs -y
修改环境变量
script
sudo vim /etc/profile # node export NODE_HOME=/data/node/ export PATH=$PATH:${NODE_HOME}/bin source /etc/profile

mac安装

下载并解压

code ~/.zshrc

export NODE_HOME=/Users/ispong/opt/node/node-v18.14.0-darwin-arm64
export PATH=$PATH:$NODE_HOME/bin

source ~/.zshrc

🔍 Reference


node 安装
https://ispong.isxcode.com/vue/node/node 安装/
Author
ispong
Posted on
March 6, 2022
Licensed under