之前使用指令:eas build -p android
上传安卓包都是顺利进行的
但是今天却报错:
Failed to upload the project tarball to EAS Build
Reason: request to https://storage.googleapis.com/. . . . . failed, reason: connect ETIMEDOUT 142.251.42.251:443
ping 142.251.42.251后发现ping不通,也尝试了重启电脑和切换网络等一系列操作后,终于ping成功了,但是报错变成了:
Failed to upload the project tarball to EAS Build
Reason: request to https://storage.googleapis.com/. . . . failed, reason: write EPIPE
当时一直报这些错给我搞毛了,感觉可能是工具环境或者是版本问题,索性直接卸载重新安装所有的工具,因为当时用yarn安装的eas:
yarn安装的卸载如下:
1、yarn global remove eas-cli
2、yarn global remove expo-cli
npm安装的卸载如下:
1、npm uninstall -g expo-cli
2、npm uninstall -g eas-cli
-------------------------------------------------------------------------------------------------------------------------------------------------------
3、删除相关文件:
Windows:
rmdir /s /q %USERPROFILE%\.expo\eas
rmdir /s /q %USERPROFILE%\.expo\android
macOS:
rm -rf ~/.expo/eas
rm -rf ~/.expo/android
yarn global add expo-cli
yarn global add eas-cli 时报错:
error graphql@16.8.1: The engine "node" is incompatible with this module. Expected version "^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0". Got "14.15.2"
error Found incompatible module.
感觉低版本的node可能还会有问题,直接来一个>=17.0.0的版本算了,切了v18.1.0,重新执行该指令成功
eas login
eas build -p android
至此终于上传🎉成功🎉