The script will never generate a response.

Hey there, using next-on-pages to develop my site. I added a lottie animation to my site and am now getting the above error. It builds and deploys fine, but there is absolutely no info on how to debug the issue! Any help would be much appreciated! 🙂
20 Replies
mr nooli
mr nooliOP12mo ago
James
James12mo ago
Are you using the latest version of next-on-pages (1.8.0)?
mr nooli
mr nooliOP12mo ago
very good question let me have a lookie I'm not but I'm upgrading it now, where can I find the changelog btw?
mr nooli
mr nooliOP12mo ago
So slight issue - I'm now running into all of this: https://github.com/cloudflare/next-on-pages/issues/413 pretty much every issue that others have run into there I'm running into aswell 😭
GitHub
[🐛 Bug]: Not-found page doesn't work with last vercel version v31.2...
next-on-pages environment related information System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 22.4.0: Mon Mar 6 21:00:41 PST 2023; root:xnu-8796.101.5~3/RELEASE_ARM64_T8103 CPU:...
James
James12mo ago
Honestly I would probably try do something like npx vercel build; rm -rf .vercel/output/functions/_not-found*; npx @cloudflare/next-on-pages --skip-build i think that might resolve the problem maybe and if you get it for _error, obviously sub out _not-found for _error
mr nooli
mr nooliOP12mo ago
okay I've done this locally and I think it works (?) but do I have to change anythign on the cloudflare dashboard
James
James12mo ago
just need to make sure your build command uses it
mr nooli
mr nooliOP12mo ago
so this is having caused more issues than fixes, I think just for the sake of simplicity I'm gonna have to move back to vercel for the landing page :/ Thanks for your help @Better James I'm going to stick with cloudflare on my main app just gonna 🤞 hope that I don't run into similar issues on that yeah it's working fine on vercel somehow 🤷‍♂️
James
James12mo ago
Well if you're running into issues it would be nice to try and resolve them
mr nooli
mr nooliOP12mo ago
absolutely, but the issue above has been open since jul 😭 I tried to use the build command you gave me, it works on my local machine (?) - but it doesn't build on cloudflare
James
James12mo ago
what is your build command in your cloudflare pages project settings?
mr nooli
mr nooliOP12mo ago
is the issue I'm running into on cloudflare and the command is: npx vercel build; rm -rf .vercel/output/functions/_not-found*; rm -rf .vercel/output/functions/_error*; npx @cloudflare/next-on-pages --skip-build;
2023-11-27T19:09:45.706715Z Cloning repository...
2023-11-27T19:09:46.91963Z From https://github.com/karthikjn01/Cruncho-Landing
2023-11-27T19:09:46.920381Z * branch 7db414e60e5c6c7753d012aadcf2f71b2cf0fdd4 -> FETCH_HEAD
2023-11-27T19:09:46.920607Z
2023-11-27T19:09:46.995842Z HEAD is now at 7db414e attempted fix
2023-11-27T19:09:46.99654Z
2023-11-27T19:09:47.105075Z
2023-11-27T19:09:47.137974Z Success: Finished cloning repository files
2023-11-27T19:09:48.054815Z Restoring from dependencies cache
2023-11-27T19:09:48.076655Z Restoring from build output cache
2023-11-27T19:09:48.40498Z Detected the following tools from environment: [email protected], [email protected]
2023-11-27T19:09:48.406Z Installing project dependencies: npm clean-install --progress=false
2023-11-27T19:09:53.490175Z npm WARN deprecated [email protected]: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-inject.
2023-11-27T19:09:53.492939Z npm WARN deprecated [email protected]: Please use @jridgewell/sourcemap-codec instead
2023-11-27T19:09:53.798319Z npm WARN deprecated [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
2023-11-27T19:09:58.506175Z npm WARN deprecated @johanaarstein/[email protected]: This package is deprecated. Please use @aarsteinmedia/dotlottie-player instead.
2023-11-27T19:09:59.15971Z npm WARN deprecated [email protected]: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
2023-11-27T19:10:12.328135Z
2023-11-27T19:09:45.706715Z Cloning repository...
2023-11-27T19:09:46.91963Z From https://github.com/karthikjn01/Cruncho-Landing
2023-11-27T19:09:46.920381Z * branch 7db414e60e5c6c7753d012aadcf2f71b2cf0fdd4 -> FETCH_HEAD
2023-11-27T19:09:46.920607Z
2023-11-27T19:09:46.995842Z HEAD is now at 7db414e attempted fix
2023-11-27T19:09:46.99654Z
2023-11-27T19:09:47.105075Z
2023-11-27T19:09:47.137974Z Success: Finished cloning repository files
2023-11-27T19:09:48.054815Z Restoring from dependencies cache
2023-11-27T19:09:48.076655Z Restoring from build output cache
2023-11-27T19:09:48.40498Z Detected the following tools from environment: [email protected], [email protected]
2023-11-27T19:09:48.406Z Installing project dependencies: npm clean-install --progress=false
2023-11-27T19:09:53.490175Z npm WARN deprecated [email protected]: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-inject.
2023-11-27T19:09:53.492939Z npm WARN deprecated [email protected]: Please use @jridgewell/sourcemap-codec instead
2023-11-27T19:09:53.798319Z npm WARN deprecated [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
2023-11-27T19:09:58.506175Z npm WARN deprecated @johanaarstein/[email protected]: This package is deprecated. Please use @aarsteinmedia/dotlottie-player instead.
2023-11-27T19:09:59.15971Z npm WARN deprecated [email protected]: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
2023-11-27T19:10:12.328135Z
2023-11-27T19:10:12.328746Z added 1032 packages, and audited 1033 packages in 23s
2023-11-27T19:10:12.328992Z
2023-11-27T19:10:12.32917Z 240 packages are looking for funding
2023-11-27T19:10:12.329353Z run `npm fund` for details
2023-11-27T19:10:12.346898Z
2023-11-27T19:10:12.347538Z 8 vulnerabilities (3 low, 5 moderate)
2023-11-27T19:10:12.347958Z
2023-11-27T19:10:12.348337Z To address issues that do not require attention, run:
2023-11-27T19:10:12.348708Z npm audit fix
2023-11-27T19:10:12.349074Z
2023-11-27T19:10:12.349443Z To address all issues, run:
2023-11-27T19:10:12.34981Z npm audit fix --force
2023-11-27T19:10:12.349982Z
2023-11-27T19:10:12.350115Z Run `npm audit` for details.
2023-11-27T19:10:12.376627Z Executing user command: npx vercel build; rm -rf .vercel/output/functions/_not-found*; rm -rf .vercel/output/functions/_error*; npx @cloudflare/next-on-pages --skip-build;
2023-11-27T19:10:14.029389Z Vercel CLI 32.5.0
2023-11-27T19:10:15.894857Z No Project Settings found locally. Run `vercel pull --yes` to retrieve them.⚡️ @cloudflare/next-on-pages CLI v.1.8.0
2023-11-27T19:10:16.463165Z ⚡️ Could not read the '.vercel/output/config.json' file.
2023-11-27T19:10:16.463518Z ⚡️ Please report this at https://github.com/cloudflare/next-on-pages/issues.
2023-11-27T19:10:16.48714Z Failed: Error while executing user command. Exited with error code: 1
2023-11-27T19:10:16.495772Z Failed: build command exited with code: 1
2023-11-27T19:10:17.518734Z Failed: error occurred while running build command
2023-11-27T19:10:12.328746Z added 1032 packages, and audited 1033 packages in 23s
2023-11-27T19:10:12.328992Z
2023-11-27T19:10:12.32917Z 240 packages are looking for funding
2023-11-27T19:10:12.329353Z run `npm fund` for details
2023-11-27T19:10:12.346898Z
2023-11-27T19:10:12.347538Z 8 vulnerabilities (3 low, 5 moderate)
2023-11-27T19:10:12.347958Z
2023-11-27T19:10:12.348337Z To address issues that do not require attention, run:
2023-11-27T19:10:12.348708Z npm audit fix
2023-11-27T19:10:12.349074Z
2023-11-27T19:10:12.349443Z To address all issues, run:
2023-11-27T19:10:12.34981Z npm audit fix --force
2023-11-27T19:10:12.349982Z
2023-11-27T19:10:12.350115Z Run `npm audit` for details.
2023-11-27T19:10:12.376627Z Executing user command: npx vercel build; rm -rf .vercel/output/functions/_not-found*; rm -rf .vercel/output/functions/_error*; npx @cloudflare/next-on-pages --skip-build;
2023-11-27T19:10:14.029389Z Vercel CLI 32.5.0
2023-11-27T19:10:15.894857Z No Project Settings found locally. Run `vercel pull --yes` to retrieve them.⚡️ @cloudflare/next-on-pages CLI v.1.8.0
2023-11-27T19:10:16.463165Z ⚡️ Could not read the '.vercel/output/config.json' file.
2023-11-27T19:10:16.463518Z ⚡️ Please report this at https://github.com/cloudflare/next-on-pages/issues.
2023-11-27T19:10:16.48714Z Failed: Error while executing user command. Exited with error code: 1
2023-11-27T19:10:16.495772Z Failed: build command exited with code: 1
2023-11-27T19:10:17.518734Z Failed: error occurred while running build command
James
James12mo ago
umm, why did the vercel cli not do anything lol Can you try changing the semi colons to ampersands npx vercel build && rm -rf .vercel/output/functions/_not-found* && rm -rf .vercel/output/functions/_error* && npx @cloudflare/next-on-pages --skip-build ohh arghghgh i know ugh, why do vercel have to make things so frustrating
mr nooli
mr nooliOP12mo ago
straight over my head 😭
James
James12mo ago
we need to generate a dummy blank project file for the vercel cli to actually work at the start of the build process time to google bash commands
mkdir .vercel; echo '{"projectId":"_","orgId":"_","settings":{"framework":"nextjs"}}' > .vercel/project.json; npx vercel build; rm -rf .vercel/output/functions/_not-found*; rm -rf .vercel/output/functions/_error*; npx @cloudflare/next-on-pages --skip-build;
mkdir .vercel; echo '{"projectId":"_","orgId":"_","settings":{"framework":"nextjs"}}' > .vercel/project.json; npx vercel build; rm -rf .vercel/output/functions/_not-found*; rm -rf .vercel/output/functions/_error*; npx @cloudflare/next-on-pages --skip-build;
Try this
mr nooli
mr nooliOP12mo ago
Oh magical, that's worked Cheers @Better James 🥳 once again, straight over my head
James
James12mo ago
XD basically vercel changed things so that it generates these nodejs functions that are never used for error pages in certain conditions that no one really can figure out accurately, so one of the ways to workaround it is to just delete those invalid functions and then continuing the build process in our cli afterwards. but when you normally run our cli, we generate a dummy .vercel/project.json file for the vercel cli since it won't run the build command without one (for some bizarre reason)
mr nooli
mr nooliOP12mo ago
ahh righto fair enough Cheers 🙂
James
James12mo ago
😁
Want results from more Discord servers?
Add your server