突破Flutter私有化仓库100M限制-Hosted packages must be smaller than 100 MB

突破Flutter私有化仓库100M限制-Hosted packages must be smaller than 100 MB,第1张

突破Flutter私有化仓库100M限制-Hosted packages must be smaller than 100 MB 关于如何创建私有化Flutter仓库、发布Flutter私有化仓库请看这里。私有化仓库大小超过100M报错查找问题所在

关于如何创建私有化Flutter仓库、发布Flutter私有化仓库请看这里。

Flutter私有化仓库创建、发布.

私有化仓库大小超过100M报错

如果个人创建的Flutter私有库大小超过100M,在使用pub publish发布私有化仓库过程中就会出现Your package is 602.9 MB. Hosted packages must be smaller than 100 MB

Package validation found the following error:
* Your package is 602.9 MB. Hosted packages must be smaller than 100 MB.
Package validation found the following potential issue:
* Your pubspec.yaml includes an "author" section which is no longer used and may be removed.
errors:[Your package is 602.9 MB. Hosted packages must be smaller than 100 MB.]
Sorry, your package is missing a requirement and can't be published yet.
For more information, see: https://dart.dev/tools/pub/cmd/pub-lish.
查找问题所在

根据报错在pub-SDK-2.10.0-64.0.dev中lib/src/validator/目录下找到size.dart文件,可以看到:

/// The maximum size of the package to upload (100 MB).
const _MAX_SIZE = 100 * 1024 * 1024;

查找到这里,就等于看到了症结所在。

只需要修改_MAX_SIZE的大小就可以突破私有仓库100M的大小限制。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/994573.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-21
下一篇 2022-05-21

发表评论

登录后才能评论

评论列表(0条)

保存