Windows下全命令便捷安装NPM nodejs

2024/06/21 program 共 456 字,约 2 分钟

参考

步骤

  • 管理员身份打开PowerShell
  • 执行命令:
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
  • 安装fnmchoco install fnm
  • fnm env --use-on-cd | Out-String | Invoke-Expression
  • 安装npm, 参考官网的命令:fnm use --install-if-missing 20
  • 更新:npm install -g npm

文档信息

Search

    Table of Contents