atomic-server icon indicating copy to clipboard operation
atomic-server copied to clipboard

Add NextJS example template

Open joepio opened this issue 1 year ago • 2 comments
trafficstars

  • Start from the #959 branch, but create a new branch. Rebase from time to time to keep Polle's changes synced.
  • Add a new folder for a NextJS project, similar to how there's a SvelteKit project
  • Aim to have a similar look, feel and featureset to the SvelteKit Project.
  • Use the same template (which creates some classes and instances)

joepio avatar Sep 11 '24 12:09 joepio

Can you push current WIP branch and mention this issue @RoelLeijser?

joepio avatar Oct 15 '24 13:10 joepio

Also, include the definition of done doc here!

joepio avatar Oct 15 '24 13:10 joepio

When deploying to Netlify sometimes it gives the response: error decoding lambda response: error decoding lambda response: unexpected end of JSON input Sometimes is does deploy but, then it 404s the whole (or a part?) of the _next/static/chunks directory. When deploying locally or to Vercel this is not a problem.

image

RoelLeijser avatar Dec 16 '24 10:12 RoelLeijser

Netlify dev also spins up a working server, so I think the problem is on deployment.

Netlify recently changed their next plugin. I think this creates a compatibility problem. The plugin is automatically added when the site is deployed to Netlify, which makes sure the version is up to date. There is no difference when explicitly specifying the version in the netlify.toml file.

RoelLeijser avatar Dec 17 '24 12:12 RoelLeijser

Netlify and Vercel both succesfully deployed 🎉

Solved by adding the --build flag to netlify deploy, not mentioned in https://docs.netlify.com/cli/get-started/. The Netlify CLI always builds before deploying, so I don't know why this fixed it, I think it might have to do with caching.

Netflify https://atomic-blog-template.netlify.app Vercel https://nextjs-blog-template-woad.vercel.app

RoelLeijser avatar Dec 23 '24 15:12 RoelLeijser