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
https://20050921.cruncho-landing.pages.dev is the URL for reference
Are you using the latest version of next-on-pages (1.8.0)?
very good question let me have a lookie
I'm not but I'm upgrading it now, where can I find the changelog btw?
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:...
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 _errorokay I've done this locally and I think it works (?) but do I have to change anythign on the cloudflare dashboard
just need to make sure your build command uses it
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 🤷♂️
Well if you're running into issues it would be nice to try and resolve them
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
what is your build command in your cloudflare pages project settings?
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;
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 frustratingstraight over my head 😭
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
Try this
Oh magical, that's worked
Cheers @Better James 🥳
once again, straight over my head
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)
ahh righto fair enough
Cheers 🙂
😁