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
https://beta.nft-gallery-5ci.pages.dev - 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
I can check more when I start work in an hour but few things I’ve noticed.
Since you set production-cf to be the production branch, we deploy to nft-gallery-5ci.pages.dev not the alias (production-cf.nft-gallery-5ci.pages.dev)
a. Which, does have a deployment but it seems there’s no index.html at the defined output
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.105655Z
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.922115Z
2023-08-02T10:25:00.922302Z 65440: "0bf1cf3.js.map"
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.
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.
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.
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 https://github.com/preschian/nft-gallery/pull/97/files#diff-65d5d69bb59dcc81ad971719549cdee5018f0a240add8b7ef5c65bee3e73dae0R398
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.