#The script will never generate a response.

41 messages Β· Page 1 of 1 (latest)

pine vector
#

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! πŸ™‚

stone dagger
#

Are you using the latest version of next-on-pages (1.8.0)?

pine vector
#

very good question let me have a lookie

#

I'm not but I'm upgrading it now, where can I find the changelog btw?

pine vector
stone dagger
#

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

pine vector
#

okay I've done this locally and I think it works (?) but do I have to change anythign on the cloudflare dashboard

stone dagger
#

just need to make sure your build command uses it

pine vector
#

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 @stone dagger 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 πŸ€·β€β™‚οΈ

stone dagger
#

Well if you're running into issues it would be nice to try and resolve them

pine vector
#

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

stone dagger
#

what is your build command in your cloudflare pages project settings?

pine vector
#

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: npm@9.6.7, nodejs@18.17.1
2023-11-27T19:09:48.406Z    Installing project dependencies: npm clean-install --progress=false
2023-11-27T19:09:53.490175Z    npm WARN deprecated rollup-plugin-inject@3.0.2: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-inject.
2023-11-27T19:09:53.492939Z    npm WARN deprecated sourcemap-codec@1.4.8: Please use @jridgewell/sourcemap-codec instead
2023-11-27T19:09:53.798319Z    npm WARN deprecated uuid@3.3.2: 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/dotlottie-player@1.5.23: This package is deprecated. Please use @aarsteinmedia/dotlottie-player instead.
2023-11-27T19:09:59.15971Z    npm WARN deprecated debug@4.1.1: 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
stone dagger
#

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

pine vector
#

straight over my head 😭

stone dagger
#

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;

#

Try this

pine vector
#

Oh magical, that's worked

#

Cheers @stone dagger πŸ₯³

#

once again, straight over my head

stone dagger
#

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)

pine vector
#

ahh righto fair enough

#

Cheers πŸ™‚