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
Hard@Work
Hard@Work4mo ago
You want output directory: .next/output/static
gulluprasad123
gulluprasad123OP4mo ago
Error: Output directory "tyd/.next/output/static" not found. getting error, also added the directory manually in the repo
Hard@Work
Hard@Work4mo ago
What's in the .next directory when you have built your project?
gulluprasad123
gulluprasad123OP4mo ago
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
Hard@Work
Hard@Work4mo ago
It should show up when you run build. It shouldn't be in the repo itself
gulluprasad123
gulluprasad123OP4mo ago
no, 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
Hard@Work
Hard@Work4mo ago
Do you have the repo public?
gulluprasad123
gulluprasad123OP4mo ago
can i rather add you to it ?
Hard@Work
Hard@Work4mo ago
Sure
gulluprasad123
gulluprasad123OP4mo ago
whats your gitlab handle ?
Hard@Work
Hard@Work4mo ago
@helloimalastair
gulluprasad123
gulluprasad123OP4mo ago
done
Hard@Work
Hard@Work4mo ago
Might be me being a tad unfamiliar with GitLab, but I don't see a clone button in the Project Page...
gulluprasad123
gulluprasad123OP4mo ago
can you check now
Hard@Work
Hard@Work4mo ago
Got it! Just to check, is your NextJS project meant to be fully static?
gulluprasad123
gulluprasad123OP4mo ago
as of now yes,its static, but will add some api /functions later. like for newsletter email collection and other stuff
Hard@Work
Hard@Work4mo ago
I would take a look at #next-on-pages then
gulluprasad123
gulluprasad123OP4mo ago
as of now how can i fix it, if i continue to keep it static for a few iterations?
Hard@Work
Hard@Work4mo ago
You need to add output: "export" to your next.config.js, then set your build output directory to out
gulluprasad123
gulluprasad123OP4mo ago
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
Want results from more Discord servers?
Add your server