cache/webpack/client-production/0.pack is 30.9 MiB in size
i have tried ssr:false, and loading all libs from upkg
build command : npm run build
output directory: .next .
kindly help
21 Replies
You want
output directory: .next/output/static
Error: Output directory "tyd/.next/output/static" not found.
getting error, also added the directory manually in the repo
What's in the
.next
directory when you have built your project?in the repo in my IDE i can see cache, server, static, types but none of this gets pushed on gitlab for some reason , so directly added the .next/output/static in Gitlab repo
It should show up when you run
build
. It shouldn't be in the repo itselfno, i tried that, i still got the .next/output static directory not found error, then i manually added the same and still same results. would it
Do you have the repo public?
can i rather add you to it ?
Sure
whats your gitlab handle ?
@helloimalastair
done
Might be me being a tad unfamiliar with GitLab, but I don't see a clone button in the Project Page...
can you check now
Got it! Just to check, is your NextJS project meant to be fully static?
as of now yes,its static, but will add some api /functions later. like for newsletter email collection and other stuff
I would take a look at #next-on-pages then
as of now how can i fix it, if i continue to keep it static for a few iterations?
You need to add
output: "export"
to your next.config.js
, then set your build output directory to out
It worked. thanks can you point me to the docs so i could read on this? also the image that i am loading from extenal domain are not displayed
Cloudflare Docs
Static site | Cloudflare Pages docs
Deploy a static site built using Next.js to Cloudflare Pages