Finsweet Starter repo causing a ERR_CONNECTION_REFUSED

I'm using a cdn to serve up a repo that I started with the finsweet-starter and It's giving me this weird error ONLY when the local environment isnt't live. As soon as I start the dev server on localhost:3000, the error on localhost:3000/esbuild:1 runs every second.
No description
6 Replies
AtomicZBRA
AtomicZBRA8mo ago
So this is expected behaviour, I think. Localhost is your local machine, so if there’s script tags with a source of localhost it’s going to need the local dev server to be running When you have bundled code hosted with a cdn you would change your script sources to point at the new cdn links. Like I said though, I think this is expected behaviour, if anything I’m saying sounds off, please provide some more context!
Alex Villacres
Alex VillacresOP8mo ago
That's what I thought as well but I have no references to localhost anywhere in my code - feel free to check it out: https://www.launchnotes.com/ You won't see the errors now b/c I have the dev server running. But really weird... @Web Bae I know you're a fan of the Finsweet Developer Starter repo - any idea why this would be happening?
Product Communication for the Modern Enterprise | LaunchNotes
Thousands of leading companies use LaunchNotes to launch new products, announce new features, share product roadmaps, collect customer feedback, and more.
No description
AtomicZBRA
AtomicZBRA8mo ago
Which are the custom scripts you're bringing in from the cdn? You've got a couple issues here i think The one that's causing this issue is this file https://cdn.jsdelivr.net/gh/alexvillacres/[email protected]/dist/index.js this has got some functionality from the the bin/build.js file that's used for serving or bundling the file, not sure how you got it into the dist folder but this is what's looking for the localhost I think this file is also erroring, might be worth checking out: https://unpkg.com/@launchnotes/[email protected]/dist/launchnotes-embed/launchnotes-embed.js
Alex Villacres
Alex VillacresOP8mo ago
hmmm - haven't touched the dist file as i know that's just built from src. but could it be that first line?
No description
AtomicZBRA
AtomicZBRA8mo ago
How did you get this index.js file? I cloned your repo from github and i ran pnpm build and the file that i got for index.js looks vastly different from yours
Web Bae
Web Bae8mo ago
yea - it looks like you've somehow imported the bin/build contents into your project build. that script is only designed to be run on your machine. check your ENTRY_POINTS in /bin/build.js and module, files, and main in package.json is your latest code on github? Like @Patrick Corsetti , I ran pnpm run build on your project and got a different index.js in dist.
Want results from more Discord servers?
Add your server