Recurring deployment issue on Pages

Hey, we are running into recurrent issues with production deployment since Cloudflare had a major outage a month ago. It seems something fundamentally is broken in your system deployment for Pages - production-cf branch - beta branch, just works.

We are your paying customer, and I would like to see this resolved as it happened again, there probably minor glitch happen on other your customers deployments too.

Last time we hit the same on branch production. We’ve created a new branch production-cf and it builds, but seems only once. I don’t want to create new ones each time new branch :smile:

Logs from builds can be found here.

I can check more when I start work in an hour but few things I’ve noticed.

  1. Since you set production-cf to be the production branch, we deploy to not the alias (
    a. Which, does have a deployment but it seems there’s no index.html at the defined output
  2. It looks like the old production branch alias works too -
  3. This is a good callout and my guess to why - Seem current release build doesn't work on production · Issue #6470 · kodadot/nft-gallery · GitHub

I’m not sure what’s different between your preview and prod setup but I’m gonna guess that’s where it’s happening.
Looking at this comment: Seem current release build doesn't work on production · Issue #6470 · kodadot/nft-gallery · GitHub
We can actually see the outputs are very different between the two branches

nitro seems to have thrown an error and didn’t exit with code 1, I’m guessing this is why it succeeded. Not sure what it actually uploaded

2023-08-02T10:20:06.499272Z [error] [BABEL] Note: The code generator has deoptimised the styling of /opt/buildhome/repo/node_modules/.pnpm/@[email protected]/node_modules/@google/model-viewer/dist/model-viewer.min.js as it exceeds the max of 500KB.
2023-08-02T10:24:57.542276Z > Rewriting sources
2023-08-02T10:24:57.542996Z > Adding source map references
2023-08-02T10:24:57.90472Z > Bundled 0 files for upload
2023-08-02T10:24:58.014352Z > Uploaded release files to Sentry
2023-08-02T10:24:58.104214Z > File upload complete (processing pending on server)
2023-08-02T10:24:58.104566Z > Organization: kodadot
2023-08-02T10:24:58.10488Z > Project: nft-gallery
2023-08-02T10:24:58.105245Z > Release: 67ad4be
2023-08-02T10:24:58.105459Z > Dist: None
2023-08-02T10:24:58.105927Z Source Map Upload Report
2023-08-02T10:25:00.079946Z [success] [nitro] Generated public dist
2023-08-02T10:25:00.081049Z [info] [nitro] Initializing prerenderer
2023-08-02T10:25:00.921751Z [error] [nitro]
2023-08-02T10:25:00.922302Z 65440: ""
2023-08-02T10:25:00.922443Z 65441: ]
2023-08-02T10:25:00.92385Z ^
2023-08-02T10:25:00.924417Z 65443: "img/logo-enkrypt.8a571eb.png",
2023-08-02T10:25:00.924632Z 65444: "img/Koda_Beta.c7acf50.svg",
2023-08-02T10:25:00.926508Z [fatal] Unexpected token (Note that you need plugins to import files that are not JavaScript)
2023-08-02T10:25:00.926723Z at error (node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/rollup.js:1858:30)
2023-08-02T10:25:00.926973Z at Module.error (node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/rollup.js:12429:16)
2023-08-02T10:25:00.927197Z at Module.tryParse (node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/rollup.js:12806:25)
2023-08-02T10:25:00.927976Z at Module.setSource (node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/rollup.js:12711:24)
2023-08-02T10:25:00.928253Z at ModuleLoader.addModuleSource (node_modules/.pnpm/rollu[email protected]/node_modules/rollup/dist/es/shared/rollup.js:21959:20)

So from what I can tell, something (env vars, build command or similiar) is different between your two envs and that is what is causing the problem.
I’d recommend looking into the two envs and seeing if you can solve that error ^
I can take a deeper look in a bit but from the surface, this doesn’t look like an issue on our end.

env vars

this differs, however it worked even before, we haven’t changing here iirc

build command

It’s the same for both the production & preview branches

I concluded the experiment where added production branch to preview deployments and will see. If it turns out it builds, checking with env vars is next but I doubt some of them has some impact tbh. builds now as a preview branch.

Let’s change ENV vars now; I’ll be surprised if it would be that one.

The answer is no, it doesn’t not builds - production-cf


@WalshyMVP care to have a look?

Okay closing, seems it’s building now. Thanks for mental support @WalshyMVP

What’s are performance difference if we keep releasing production through preview builds or production ones?

There isn’t one. They’re both the same through and through.
A really old deployment (that isn’t active on an alias) may have a cold start but you should only ever use aliases (production.<project> instead of <hash>.<project>) so should be good.

hi @WalshyMVP @Walshy

after some further testing, I found out that it doesn’t work on cloudflare pages, but it works fine on vercel and netlify. any idea why? I already put same env each platform


it works when I disable source-maps

is there some limit on cf-pages?


I’d have to look at build logs to see why it fails, I can look later.

Do you have whatever plugin the log says it needs to handle non-js?

64887: "img/logo-talisman.4e0808a.svg",
64888: "img/logo-enkrypt.8a571eb.png",
[fatal] Unexpected token (Note that you need plugins to import files that are not JavaScript)

If you don’t know what this is talking about or what plugin it needs, I’d suggest seeking support from Nitro or the Sentry plugin.

Pages just runs your build command, it does nothing to the files or to impact the outcome.

It seems other providers like Netlify & Vercel builds well.


This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.