Working Pages deployment from yesterday fails today

Hello!

I have a strange issue with my Cloudflare Pages. This morning, deployments were suddenly exiting with an error. First I thought there was an issue in the new commits (I have Pages linked to Github), but no:

Even the commits that were deployed successfully yesterday, don’t work any more today. I noticed that Cloudflare grouped Pages together with Workers recently. Did they make any other changes that could cause this issue?

If Cloudflare is reading this: My Zone ID is 17829fd6fe68c1ef3a6fbaa74f755a70, and the commit ID is 2378617415076137ccf8a198117b55d45bde6da3.

Deployment 3d377d36-c72e-4232-91ed-c17c50ab30be worked,
deployment 5fe77ef7-d5f9-4b3d-aa66-86270b75a418 failed.

I’ll try to deploy again later today. Hopefully, Cloudflare only has a temporary issue. But if that’s the case, the issue isn’t effecting all Pages deployment: I was able to deploy another Pages site.

Thank you in advance for your help!

What’s your build log for the failed deployment?

@WalshyMVP, thank you for your response, and my apologies, totally forgot to add the error log and can’t edit my original post for whatever reason.

Webpack fails with a weird error about files that haven’t changed:

12:37:56.690	 ERROR #98123  WEBPACK
12:37:56.691	Generating JavaScript bundles failed
12:37:56.691	Cannot read property 'e' of undefined
12:37:56.691	File: node_modules/@wkocjan/gatsby-theme-intro/src/styles/style.css
12:37:56.694	 ERROR #98123  WEBPACK
12:37:56.694	Generating JavaScript bundles failed
12:37:56.694	Cannot read property 'e' of undefined
12:37:56.694	File: src/@wkocjan/gatsby-theme-intro/components/contact-form/contact-form.css
12:37:56.696	 ERROR #98123  WEBPACK
12:37:56.696	Generating JavaScript bundles failed
12:37:56.696	Cannot read property 'e' of undefined
12:37:56.697	File: src/@wkocjan/gatsby-theme-intro/components/work-history/work-history.css
12:37:56.939	Failed: build command exited with code: 1
12:37:57.825	Failed: error occurred while running build command

I am using this theme: https://github.com/wkocjan/gatsby-theme-intro/

And yes, it’s old, but it works when forcing old dependencies:

  "dependencies": {
    "gatsby": "3.15.0",
    "react": "^16.9.0",
    "react-dom": "^16.9.0",
    "@wkocjan/gatsby-theme-intro": "^2.0.1"
  }

Plus, it worked before and I haven’t made any changes. It’s even the same commit. :wink:

Or do you think something on Cloudflare’s end can have changed causing this issue?

My guess is probably a dependency update. Yours aren’t pinned so a new update can change behaviour.

I’d recommend pinning your versions and trying the build again

1 Like

As a note, Pages currently runs npm install instead of npm ci which means that lock files are ignored. This can relate in builds installing different versions even if pinned.

This is fixed in the v2 build system (announced today), but for now pinning your versions is about the best you can and hope no transitive dependencies change or implement breaking changes.

Thank you so much, @WalshyMVP, that helped! :slight_smile: The deployment works again with these updated dependencies:

  "dependencies": {
    "gatsby": "3.15.0",
    "react": "17.0.1",
    "react-dom": "17.0.1",
    "@wkocjan/gatsby-theme-intro": "2.0.1"
  }

@cherryjimbo, thank you also for the info, that’s good to know! Is v2 used automatically for GitHub integrations?

2 Likes

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