• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录

无信不立

  • 博客园
  • 联系
  • 订阅
  • 管理

公告

View Post

【vue】Mac上安装Node和NPM

第一步:进入node.js的官网

https://nodejs.org/en/download/package-manager

 第二步:选择适合的安装包进行下载

选择适合你的macOS版本的安装程序。

  • 如果你使用的是Intel芯片,请选择"macOS Installer";
  • 如果你使用的是Apple Silicon芯片(M1芯片),请选择"macOS Universal Installer"。

 

# installs nvm (Node Version Manager)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
# download and install Node.js (you may need to restart the terminal)
nvm install 20
# verifies the right Node.js version is in the environment
node -v # should print `v20.16.0`
# verifies the right npm version is in the environment
npm -v # should print `10.8.1`

 第二步:确认安装成功

shangxiaofei@XXSHANG-MC0 ~ % nvm install 20
Downloading and installing node v20.16.0...
Downloading https://nodejs.org/dist/v20.16.0/node-v20.16.0-darwin-arm64.tar.xz...
######################################################################### 100.0%
Computing checksum with shasum -a 256
Checksums matched!
Now using node v20.16.0 (npm v10.8.1)
Creating default alias: default -> 20 (-> v20.16.0)
shangxiaofei@XXSHANG-MC0 ~ % node -v
v20.16.0
shangxiaofei@XXSHANG-MC0 ~ % npm -v
10.8.1
shangxiaofei@XXSHANG-MC0 ~ % 

 

 
 

posted on 2018-07-29 12:38  无信不立  阅读(371)  评论(0)    收藏  举报

刷新页面返回顶部
 
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3