Build failed due to failed upload when using nuxt generate (~8,000 pages)

Hey all,

I’ve searched around a bit and found a few other posts regarding this issue. Unfortunately, none of the solutions in those posts resolved my issue. Hoping someone can point me in the right direction.

I am building a site using Nuxt and the nuxt-generate command. The site has about 8,000 pages. I’ve made several attempts at building so far. The files that fail to upload seem to vary each time, but the usual suspects are the root index.html, 404.html, and sitemap.xml. Those seem to appear most frequently.

At first I assumed it might be sitemap.xml, possibly due to file size. However, when inspecting the latest build logs, sitemap.xml uploads just fine. At least in the last build, it’s actually index.html that ends up failing the build:

failed during stage 'deploying site': Failed to execute deploy: Upload cancelled: index.html

I’ve tried removing some of the problem pages, but to no avail. The only time I can get everything to build properly is by taking out the bulk of the pages. Only then can I get everything to build and publish properly. Before this latest build, I cleared cache as advised in the build docs.

On my local environment, everything builds fine. I can’t really replicate uploading to Netlify’s CDN in my own environment and the logs aren’t terribly verbose about why these uploads fail, so I’m a bit at a loss here. Locally, index.html is only about 36KB, so I don’t believe it’s a filesize issue.

I’m not using any functions.

For additional context, these are the lines leading up to failed build status:

11:32:53 PM: Starting to deploy site from '/dist'
11:32:55 PM: Creating deploy tree asynchronously
11:34:11 PM: 8027 new files to upload
11:34:11 PM: 0 new functions to upload
11:41:18 PM: Starting post processing
11:42:01 PM: Failed to upload file: 404.html
11:42:04 PM: Failed to upload file: users/index.html
11:42:15 PM: Failed to upload file: index.html
11:42:15 PM: Failing build: Failed to deploy site
11:42:15 PM: failed during stage 'deploying site': Failed to execute deploy: Upload cancelled: index.html
11:42:15 PM: Finished processing build request in 13m54.507247491s

I finally got the site to build after making a few slight adjustments:

  1. Upgrade from Nuxt 2.10.0 -> Nuxt 2.11.0
  2. Remove build.html.cache and build.html.hardSource parameters from nuxt.config.js, which provides caching (redundant since Netlify already caches dependencies)

There are still error messages about failed uploads appearing. Additionally, there is a new error message re: TextConsumer:

1:18:37 PM: Starting to deploy site from '/dist'
1:18:38 PM: Creating deploy tree asynchronously
1:20:27 PM: 8048 new files to upload
1:20:27 PM: 0 new functions to upload
1:28:26 PM: Starting post processing
1:28:33 PM: Failed to upload file: users/index.html
1:28:33 PM: Failed to upload file: index.html
1:28:33 PM: Failed to upload file: 404.html
1:28:33 PM: Failing build: Failed to deploy site
1:28:33 PM: failed during stage 'deploying site': Failed to execute deploy: &{0 } (*models.Error) is not supported by the TextConsumer, can be resolved by supporting TextUnmarshaler interface
1:28:33 PM: Finished processing build request in 14m57.876495783s
1:28:54 PM: Starting post processing
1:45:43 PM: Post processing done
1:45:43 PM: Site is live

Are these errors something I need to worry about?

I think that we just solved that problem this morning :smiley: - also improved the upload speed for sites like yours! I’ll be curious to know if you still get that kind of error message with a newer deploy.

1 Like

Thanks, @fool ! Just did another deploy without changing anything in my build settings (either in Nuxt or on Netlify) and it built without any error. Looks like the fixes / changes worked :smiley: