Windows 11 安装AIRI踩坑指北

📅 发布时间:2026/7/15 14:48:22 👁️ 浏览次数:
Windows 11 安装AIRI踩坑指北
最近在Windows笔记本上想要折腾一下AIRI参考了 你的电子老婆开源了登顶GitHub热榜这篇文章但没想到坑这么多╰‵□′╯这里记录一下为后人参考一、nodejs安装问题在使用scoop安装nodejs之后遇到了如下问题 corepack enable corepack : 无法将“corepack”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写如果包括路径请确保 路径正确然后再试一次。 所在位置 行:1 字符: 1 corepack enable ~~~~~~~~ CategoryInfo : ObjectNotFound: (corepack:String) [], CommandNotFoundException FullyQualifiedErrorId : CommandNotFoundException原因是使用如下命令进行安装会自动安装nodejs的25版本这个版本不自带corepack修复方法如下# 有问题的命令 scoop install nodejs # 修复如下即安装稳定版 scoop install nodejs-lts二、c组件问题后续顺利安装了nodejs和pnpm等但使用 pnpm install 时遇到了如下问题apps/stage-tamagotchi postinstall$ electron-builder install-app-deps │ • electron-builder version26.8.1 │ • loaded configuration filepackage.json (build field) │ [electron-builder/config] Warning: Xcode version is below 26. Using .icns format for macOS app icon. │ • loaded parent configuration fileD:\BaiduNetdiskDownload\AIRI\airi\apps\stage-tamagotchi\electron-builder.conf… │ • packageManager not detected by file, falling back to environment detection resolvedPackageManagerpnpm detecte… │ • detected workspace root for project using packageManager field pmpnpm configpnpm10.30.3 resolvedD:\BaiduNe… │ • executing electron/rebuild electronVersion40.6.1 archx64 buildFromSourcefalse workspaceRootD:\BaiduNetdis… │ • installing native dependencies archx64 │ • preparing moduleNameparcel/watcher archx64 │ ⨯ (node:24752) [DEP0169] DeprecationWarning: url.parse() behavior is not standardized and prone to errors that … │ (Use node --trace-deprecation ... to show where the warning was created) │ (node:24752) [DEP0190] DeprecationWarning:也就是在安装stage-tamagotichi的时候找不到编译 C 代码所需的 Visual Studio 生成工具 (Build Tools)检查发现是我之前使用 visual studio installer 安装的为2026版本的 visual studio无法被正确调用解决方法也很简单安装 visual studio 2022 即可可以使用下面链接的文件进行安装能够节省一些空间https://aka.ms/vs/17/release/vs_buildtools.exe注意在 visual studio 2026 中以单个组件的方式安装对应的C组件也是不行的没法被检测到使用环境变量、.npmrc 文件中指定编译器版本或路径也不可以调用的底层安装函数不认这个设置