NetEase / tango

A code driven low-code builder, develop low-code app on your codebase.
https://netease.github.io/tango-site/
MIT License
2.12k stars 181 forks source link

codesandbox-client 使用yarn install 部分安装失败 #141

Open JunmingZ opened 5 months ago

JunmingZ commented 5 months ago

image

ccloli commented 5 months ago

Windows 建议使用 WSL 避免未知的问题。

根据上面的错误信息,给几个可能的解决思路:

  1. 使用 yarn 1.x
  2. 有可能是你使用的 yarn 的版本对 node-gyp 处理有问题,在 https://github.com/yarnpkg/berry/issues/5804 有和你相似的问题,可尝试按照 1 降级 yarn,或者手动安装 node-gyp
  3. 确定系统内已经安装了 Python 与 MSVC 构建工具
  4. 有可能是 Windows 路径最大字符数限制导致部分文件不存在,请确认系统已经开启了长路径支持,可确认系统注册表的 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystemLongPathsEnabled 一项已配置为 DWORD 1
  5. 有可能是 git 也被最大字符数限制导致 checkout 文件失败,请确认 git 已经开启了长路径支持,可通过执行 git config --global core.longpaths true 解决
  6. 有可能是是 node-gpy 与当前的 Node.js 版本和 Python 版本存在冲突,可尝试参考 node-gyp 的更新文档 手动更新 node-gyp

如果上面的方案均无法解决,建议反馈至 上游的 codesandbox-client 官方 repo。Tango 没有对 codesandbox-client 的依赖作任何修改,因此你遇到的问题应该在官方的仓库也能复现。