Failed: Pages deployments stopped working

Hello, since today, our website is not deploying and started giving this error, and it is failling the
13:36:00.964 Success: Finished cloning repository files 13:36:02.910 13:36:02.999 ✘ [ERROR] No Pages config file found 13:36:02.999 13:36:02.999 13:36:03.003 🪵 Logs were written to "/root/.config/.wrangler/logs/wrangler-2024-04-10_17-36-02_717.log" 13:36:03.015 No wrangler.toml file found 13:36:03.181 Detected the following tools from environment: [email protected], [email protected], [email protected] 13:36:03.561 Preparing [email protected] for immediate activation... 13:36:04.490 Installing project dependencies: yarn 13:36:05.404 ➤ YN0028: The lockfile would have been created by this install, which is explicitly forbidden. 13:36:05.405 ➤ YN0000: Failed with errors in 0s 2ms 13:36:05.434 Error: Exit with error code: 1 13:36:05.434 at ChildProcess.<anonymous> (/snapshot/dist/run-build.js) 13:36:05.434 at Object.onceWrapper
17 Replies
Walshy
Walshy8mo ago
The lockfile would have been created by this install, which is explicitly forbidden
Seems like you haven't committed your yarn.lock
Ercan
ErcanOP8mo ago
Hmm, don't think this is the case, but checking now we did not change anything that might cause any build error though. Hi again @Walshy | Deploying , after investigation we realized that the cloudlfare build process has started using yarn itself even though we did not change anything Our previous builds were using npm for build process, and this is so weird
Walshy
Walshy8mo ago
the pages build process has not changed here recently. We try and detect your package manager through like engines, existance of yarn files, etc. do you have anything referencing yarn in your repo? package.json or some yarn file?
Ercan
ErcanOP8mo ago
We have package.json but not yarn files
Ercan
ErcanOP8mo ago
No description
Ercan
ErcanOP8mo ago
I am not sure how this detected both yarn and npm together
Walshy
Walshy8mo ago
what's your package.json?
Ercan
ErcanOP8mo ago
No description
Walshy
Walshy8mo ago
hmm that seems fine i don't know the logic anymore off the top of my head so not sure all that is checked and in what order these days Have a YARN_VERSION env var by chance?
Ercan
ErcanOP8mo ago
Hm no double checked. It is so weird though, it started happening today, and we did not even change anything. So I think this is related to these wrangler.toml changes
Walshy
Walshy8mo ago
:thonk: wrangler.toml changes didn't touch any of the detection stuff let me have a quick look if we released anything that did
Ercan
ErcanOP8mo ago
Sure thank you!
Walshy
Walshy8mo ago
ok so We haven't changed this since March 27th The logic is 1. env var 2. version file 3. package.json "engines" 4. lock files (yarn.lock in your case) 5. default to npm if we didn't hit any of the above i wish we had logs to say which of those was being hit but we do not :blob_sweat:
Ercan
ErcanOP8mo ago
I am gonna check some dependencies that might be somehow affecthing this, or got updated. I will spend some time, hope can find it.
Walshy
Walshy8mo ago
(cc: @Dario this convo may interest you -- we may want logs on what detection method we used even if debug logs)
Dario
Dario8mo ago
yeah 🙂 I guess more transparency on what's going on in the build system and what takes precedence over what would in general be a nice addition 🙂
TheNeur0mancer
TheNeur0mancer8mo ago
So, I have a Hugo site and have used NPM to manage it - this adds a couple of interesting management features which Hugo alone lacks.
Possibly, i haven't noticed the error until just now, i update my site about once per month... but the message above seems to indicate that the presence of package.json might be influencing this behavior. If i add a wrangler.toml (which I don't want, because i prefer "dashboard" configuration, the message goes away. It "seems" like the "error" is more of a "warn". but I'm not sure. I do specify all of the following in my deployments:
GO_VERSION HUGO_VERSION NODE_VERSION NPM_VERSION ... and have a package.json/lock for a otherwise Hugo driven project. The build process that actually runs is "npm run blah-blah" however as the original poster described above, the error appears just after cloning (before tools are even installed)
Want results from more Discord servers?
Add your server