Expo Publish: Request failed with status code 413



我正在尝试使用React Native和Windows 10在博览会上发布一个项目,它每次都显示我这个错误,我找不到任何明确的修复,还有其他人有这个问题吗?

expo publish --release-channel staging
- Expo SDK: 40.0.0
- Release channel: staging
- Workflow: Managed
Building optimized bundles and generating sourcemaps...
Starting Metro Bundler
Finished building JavaScript bundle in 15886ms.
Bundle                     Size
┌ index.ios.js          1.72 MB
├ index.android.js      1.73 MB
├ index.ios.js.map      5.18 MB
└ index.android.js.map  5.19 MB
�💡 JavaScript bundle sizes affect startup time. Learn more: https://expo.fyi/javascript-bundle-sizes
Analyzing assets
Saving assets
uploading appcomponentspexelsintro.mp4
uploading appassetsWDD-logo.png
uploading appassetsicon.png
Request failed with status code 413
Error: Request failed with status code 413
at createError (C:Users{user}AppDataRoamingnpmnode_modulesexpo-clinode_modulesaxioslibcorecreateError.js:16:15)
at settle (C:Users{user}AppDataRoamingnpmnode_modulesexpo-clinode_modulesaxioslibcoresettle.js:17:12)
at IncomingMessage.handleStreamEnd (C:Users{user}AppDataRoamingnpmnode_modulesexpo-clinode_modulesaxioslibadaptershttp.js:260:11)
at IncomingMessage.emit (events.js:326:22)
at endReadableNT (_stream_readable.js:1252:12)
at processTicksAndRejections (internal/process/task_queues.js:80:21)

js bundle + assets的大小是有限的,我不太记得了,但它大约是40-50 MB。我假设pexelsintro.mp4负责在你的情况下超过这个。您需要以某种方式限制已发布资产的大小或自行托管(https://docs.expo.io/distribution/hosting-your-app/)。如果你不需要OTA更新,你可以在本地机器上使用ngrok之类的东西,并在构建后关闭服务器,但要确保在这种情况下禁用更新。

相关内容

最新更新