[{"data":1,"prerenderedAt":383},["ShallowReactive",2],{"\u002F2026\u002Fhow-to-install-nodejs":3,"surround-\u002F2026\u002Fhow-to-install-nodejs":372},{"id":4,"title":5,"body":6,"categories":346,"date":348,"description":349,"draft":350,"extension":351,"image":352,"meta":353,"navigation":355,"path":356,"permalink":357,"published":357,"readingTime":358,"recommend":357,"references":357,"seo":363,"sitemap":364,"stem":365,"tags":366,"type":370,"updated":348,"__hash__":371},"content\u002Fposts\u002F2026\u002Fhow-to-install-nodejs.md","【Node.js】安装教程",{"type":7,"value":8,"toc":338},"minimark",[9,14,27,32,40,54,58,64,68,74,78,82,88,92,98,102,111,115,130,134,139,143,148,152,158,162,168,172,179,183,186,204,208,214,220,224,227,230,237,241,245,250,253,267,271,276,279,283,289,292,296,302,304,308,312,322],[10,11,13],"h2",{"id":12},"nodejs下载","Node.js下载",[15,16,17,18,22,23],"p",{},"访问 ",[19,20,21],"strong",{},"Node.js"," 官方网站 ",[24,25,26],"code",{"code":26},"nodejs.org\u002Fzh-cn",[28,29],"pic",{"caption":30,"src":31},"Node.js 官网","https:\u002F\u002Fpostpic.iicemeta.com\u002Fhow-to-install-nodejs\u002FScreenshot_14-9-2026_20251_nodejs.org.jpeg",[33,34,37],"alert",{"title":35,"type":36},"系统自动检测","info",[15,38,39],{},"由于浏览器会自动检测系统并为我们选择合适的 Node.js 版本，因此这里我们不需要进行任何操作。",[33,41,44],{"title":42,"type":43},"提示","tip",[15,45,46,47,50,51,53],{},"Node.js 新版已经放弃 ",[19,48,49],{},"Windows7"," 系统的支持，如果需要在 ",[19,52,49],{}," 上使用，请寻找其他教程",[28,55],{"caption":56,"src":57},"Node.js 下载页面","https:\u002F\u002Fpostpic.iicemeta.com\u002Fhow-to-install-nodejs\u002Fimage.png",[15,59,60,61],{},"这里我们直接点击下载 ",[19,62,63],{},"Windows 安装程序(.msi)",[28,65],{"caption":66,"src":67},"Node.js 下载页面 - 下载按钮","https:\u002F\u002Fpostpic.iicemeta.com\u002Fhow-to-install-nodejs\u002Fimage-1.png",[15,69,70,71,73],{},"下载完成后会得到 ",[19,72,21],{}," 的 .msi 安装文件",[28,75],{"caption":76,"src":77},"Node.js 安装文件","https:\u002F\u002Fpostpic.iicemeta.com\u002Fhow-to-install-nodejs\u002Fimage-2.png",[10,79,81],{"id":80},"nodejs安装","Node.js安装",[15,83,84,85,87],{},"双击下载的安装包运行 ",[19,86,21],{}," 安装程序",[28,89],{"caption":90,"src":91},"Node.js 安装程序","https:\u002F\u002Fpostpic.iicemeta.com\u002Fhow-to-install-nodejs\u002Fimage-3.png",[15,93,94,95],{},"来到这个界面以后点击 ",[19,96,97],{},"Next",[28,99],{"caption":100,"src":101},"Node.js 安装程序 - 主界面","https:\u002F\u002Fpostpic.iicemeta.com\u002Fhow-to-install-nodejs\u002Fimage-4.png",[15,103,104,105,108,109],{},"在 ",[19,106,107],{},"I accept"," 前面打勾然后点击 ",[19,110,97],{},[28,112],{"caption":113,"src":114},"Node.js 安装程序 - 隐私政策","https:\u002F\u002Fpostpic.iicemeta.com\u002Fhow-to-install-nodejs\u002Fimage-5.png",[33,116,119],{"title":117,"type":118},"注意","warning",[15,120,121,122,125,126,129],{},"如果你是新手， ",[19,123,124],{},"不要"," 更改安装路径，直接安装在C盘，否则会带来很多 ",[19,127,128],{},"不必要的麻烦"," ！！！",[28,131],{"caption":132,"src":133},"Node.js 安装程序 - 安装路径","https:\u002F\u002Fpostpic.iicemeta.com\u002Fhow-to-install-nodejs\u002Fimage-6.png",[15,135,136,137],{},"这里不用进行任何改动，直接点击 ",[19,138,97],{},[28,140],{"caption":141,"src":142},"Node.js 安装程序 - 环境变量等","https:\u002F\u002Fpostpic.iicemeta.com\u002Fhow-to-install-nodejs\u002Fimage-7.png",[15,144,145,146],{},"这里同样不用进行改动，直接点击 ",[19,147,97],{},[28,149],{"caption":150,"src":151},"Node.js 安装程序 - 附加内容","https:\u002F\u002Fpostpic.iicemeta.com\u002Fhow-to-install-nodejs\u002Fimage-8.png",[15,153,154,155],{},"现在点击 ",[19,156,157],{},"install",[28,159],{"caption":160,"src":161},"Node.js 安装程序 - 执行安装","https:\u002F\u002Fpostpic.iicemeta.com\u002Fhow-to-install-nodejs\u002Fimage-9.png",[15,163,164,165],{},"这里如果弹出这个窗口，需要点击 ",[19,166,167],{},"是",[28,169],{"caption":170,"src":171},"Windows 用户账户控制","https:\u002F\u002Fpostpic.iicemeta.com\u002Fhow-to-install-nodejs\u002Fimage-10.png",[15,173,174,175,178],{},"来到这个界面就是安装完成了，我们可以点击 ",[19,176,177],{},"Finish"," 来关闭安装程序",[28,180],{"caption":181,"src":182},"Node.js 安装程序 - 安装完成","https:\u002F\u002Fpostpic.iicemeta.com\u002Fhow-to-install-nodejs\u002Fimage-11.png",[10,184,185],{"id":185},"验证安装",[15,187,188,191,192,195,196,200,201],{},[19,189,190],{},"右键"," 点击 ",[19,193,194],{},"Windows徽标"," 或者按 ",[197,198],"key",{"code":199},"Win"," + ",[197,202],{"code":203},"X",[28,205],{"caption":206,"src":207},"Windows 桌面","https:\u002F\u002Fpostpic.iicemeta.com\u002Fhow-to-install-nodejs\u002Fimage-12.png",[15,209,210,211],{},"点击 ",[19,212,213],{},"Windows Powershell",[15,215,216,217],{},"在最新版Windows中，这里也叫做 ",[19,218,219],{},"终端",[28,221],{"caption":222,"src":223},"win+x 菜单","https:\u002F\u002Fpostpic.iicemeta.com\u002Fhow-to-install-nodejs\u002Fimage-13.png",[15,225,226],{},"会出现一个可以输入命令的地方",[28,228],{"caption":213,"src":229},"https:\u002F\u002Fpostpic.iicemeta.com\u002Fhow-to-install-nodejs\u002Fimage-14.png",[15,231,232,233,236],{},"输入以下命令并按 ",[197,234],{"code":235},"Enter"," 执行：",[238,239],"copy",{"code":240},"node -v",[28,242],{"caption":243,"src":244},"执行 node -v","https:\u002F\u002Fpostpic.iicemeta.com\u002Fhow-to-install-nodejs\u002Fimage-15.png",[15,246,247,248,236],{},"接下来输入以下命令并按 ",[197,249],{"code":235},[238,251],{"code":252},"npm -v",[33,254,256,263],{"title":255,"type":118},"可能出现的问题",[15,257,258,259,262],{},"如果出现 ",[19,260,261],{},"Windows Powershell 禁止运行脚本"," 的提示，需要执行以下设置步骤。如果未出现此内容可跳过。",[15,264,216,265],{},[19,266,219],{},[28,268],{"caption":269,"src":270},"Windows Powershell 禁止运行脚本示例图","https:\u002F\u002Fpostpic.iicemeta.com\u002Fhow-to-install-nodejs\u002Fimage-16.png",[15,272,232,273,275],{},[197,274],{"code":235}," 执行，允许运行脚本：",[238,277],{"code":278},"Set-ExecutionPolicy RemoteSigned -Scope CurrentUser",[28,280],{"caption":281,"src":282},"Windows Powershell 设置允许运行脚本","https:\u002F\u002Fpostpic.iicemeta.com\u002Fhow-to-install-nodejs\u002Fimage-17.png",[15,284,285,286,288],{},"输入以下内容并按 ",[197,287],{"code":235}," 确认：",[238,290],{"code":291},"Y",[28,293],{"caption":294,"src":295},"Windows Powershell 设置允许运行脚本 - 确认","https:\u002F\u002Fpostpic.iicemeta.com\u002Fhow-to-install-nodejs\u002Fimage-18.png",[15,297,298,299,301],{},"现在重新输入以下命令并按 ",[197,300],{"code":235}," 执行，出现以下内容即为安装成功：",[238,303],{"code":252},[28,305],{"caption":306,"src":307},"安装成功 - npm 版本输出","https:\u002F\u002Fpostpic.iicemeta.com\u002Fhow-to-install-nodejs\u002Fimage-19.png",[10,309,311],{"id":310},"恭喜","恭喜！！！",[15,313,314,315,317,318,321],{},"现在你已经完成 ",[19,316,21],{}," 的安装，尽情开启 ",[19,319,320],{},"Agent"," 世界吧！！！",[323,324,326],"folding",{"title":325},"【附】Windows Powershell 完整输出内容",[327,328,335],"pre",{"className":329,"code":331,"filename":332,"language":333,"meta":334},[330],"language-powershell","Windows PowerShell\n版权所有（C） Microsoft Corporation。保留所有权利。\n\n安装最新的 PowerShell，了解新功能和改进！https:\u002F\u002Faka.ms\u002FPSWindows\n\nPS C:\\Users\\iicemeta> node -v\nv24.21.0\nPS C:\\Users\\iicemeta> npm -v\nnpm : 无法加载文件 C:\\Program Files\\nodejs\\npm.ps1，因为在此系统上禁止运行脚本。有关详细信息，请参阅 https:\u002Fgo.microsof\nt.com\u002Ffwlink\u002F?LinkID=135170 中的 about_Execution_Policies。\n所在位置 行:1 字符: 1\n+ npm -v\n+ ~~~\n    + CategoryInfo          : SecurityError: (:) []，PSSecurityException\n    + FullyQualifiedErrorId : UnauthorizedAccess\nPS C:\\Users\\iicemeta> Set-ExecutionPolicy RemoteSigned -Scope CurrentUser\n\n执行策略更改\n执行策略可帮助你防止执行不信任的脚本。更改执行策略可能会产生安全风险，如 https:\u002Fgo.microsoft.com\u002Ffwlink\u002F?LinkID=135170\n中的 about_Execution_Policies 帮助主题所述。是否要更改执行策略?\n[Y] 是(Y)  [A] 全是(A)  [N] 否(N)  [L] 全否(L)  [S] 暂停(S)  [?] 帮助 (默认值为\"N\"): Y\nPS C:\\Users\\iicemeta> npm -v\n11.19.0\nPS C:\\Users\\iicemeta>\n","Windows PowerShell","powershell","wrap",[24,336,331],{"__ignoreMap":337},"",{"title":337,"searchDepth":339,"depth":339,"links":340},4,[341,343,344,345],{"id":12,"depth":342,"text":13},2,{"id":80,"depth":342,"text":81},{"id":185,"depth":342,"text":185},{"id":310,"depth":342,"text":311},[347],"技术","2026-09-14 20:22:00","Node.js 是目前 AI 时代不可或缺的工具之一，拥有丰富的组件库和众多 Agent 工具。",false,"md","https:\u002F\u002Fpostpic.iicemeta.com\u002Fhow-to-install-nodejs\u002FGemini_Generated_Image_z5xa9dz5xa9dz5xa.jpg",{"slots":354},{},true,"\u002F2026\u002Fhow-to-install-nodejs",null,{"text":359,"minutes":360,"time":361,"words":362},"4 min read",3.25,195000,650,{"title":5,"description":349},{"loc":356},"posts\u002F2026\u002Fhow-to-install-nodejs",[21,367,368,369],"教程","AI","基础工具","tech","IIA4ffaymTpbZScLoTfvt7Q2k4wSbsgd4ig9WvchLsA",[373,378],{"title":374,"path":375,"stem":376,"date":377,"type":370,"children":-1},"【Minecraft】认识启动器与HMCL的下载与安装","\u002F2026\u002Fminecraft-java-learn-and-install-launcher","posts\u002F2026\u002Fminecraft-java-learn-and-install-launcher","2026-04-05 11:00:50",{"title":379,"path":380,"stem":381,"date":382,"type":370,"children":-1},"【Node.js】更换镜像源","\u002F2026\u002Fnodejs-change-registry-mirror","posts\u002F2026\u002Fnodejs-change-registry-mirror","2026-09-15 10:00:00",1789735338176]