ENOSPC: no space left on device - in cloudflare workers when i try to deploy my next.js app

Hi everyone. I'm trying to deploy my next.js app to cf workers but i'm getting this error when it builds the app
node:fs:3004
17:20:07.007 binding.copyFile(
17:20:07.007 ^
17:20:07.007
17:20:07.007 Error: ENOSPC: no space left on device, copyfile '/opt/buildhome/repo/apps/nd-web-home-next.js/.next/cache/webpack/server-production/0.pack' -> '/opt/buildhome/repo/apps/nd-web-home-next.js/.open-next/.next/cache/webpack/server-production/0.pack'
17:20:07.007 at copyFileSync (node:fs:3004:11)
17:20:07.007 at copyFile (node:internal/fs/cp/cp-sync:104:3)
17:20:07.007 at onFile (node:internal/fs/cp/cp-sync:83:25)
17:20:07.007 at getStats (node:internal/fs/cp/cp-sync:72:12)
17:20:07.009 at copyDir (node:internal/fs/cp/cp-sync:170:9)
17:20:07.010 at mkDirAndCopy (node:internal/fs/cp/cp-sync:145:3)
17:20:07.010 at onDir (node:internal/fs/cp/cp-sync:139:25)
17:20:07.010 at getStats (node:internal/fs/cp/cp-sync:68:12)
17:20:07.010 at copyDir (node:internal/fs/cp/cp-sync:170:9)
17:20:07.010 at mkDirAndCopy (node:internal/fs/cp/cp-sync:145:3) {
17:20:07.010 errno: -28,
17:20:07.011 code: 'ENOSPC',
17:20:07.011 syscall: 'copyfile',
17:20:07.011 path: '/opt/buildhome/repo/apps/nd-web-home-next.js/.next/cache/webpack/server-production/0.pack',
17:20:07.011 dest: '/opt/buildhome/repo/apps/nd-web-home-next.js/.open-next/.next/cache/webpack/server-production/0.pack'
17:20:07.011 }
node:fs:3004
17:20:07.007 binding.copyFile(
17:20:07.007 ^
17:20:07.007
17:20:07.007 Error: ENOSPC: no space left on device, copyfile '/opt/buildhome/repo/apps/nd-web-home-next.js/.next/cache/webpack/server-production/0.pack' -> '/opt/buildhome/repo/apps/nd-web-home-next.js/.open-next/.next/cache/webpack/server-production/0.pack'
17:20:07.007 at copyFileSync (node:fs:3004:11)
17:20:07.007 at copyFile (node:internal/fs/cp/cp-sync:104:3)
17:20:07.007 at onFile (node:internal/fs/cp/cp-sync:83:25)
17:20:07.007 at getStats (node:internal/fs/cp/cp-sync:72:12)
17:20:07.009 at copyDir (node:internal/fs/cp/cp-sync:170:9)
17:20:07.010 at mkDirAndCopy (node:internal/fs/cp/cp-sync:145:3)
17:20:07.010 at onDir (node:internal/fs/cp/cp-sync:139:25)
17:20:07.010 at getStats (node:internal/fs/cp/cp-sync:68:12)
17:20:07.010 at copyDir (node:internal/fs/cp/cp-sync:170:9)
17:20:07.010 at mkDirAndCopy (node:internal/fs/cp/cp-sync:145:3) {
17:20:07.010 errno: -28,
17:20:07.011 code: 'ENOSPC',
17:20:07.011 syscall: 'copyfile',
17:20:07.011 path: '/opt/buildhome/repo/apps/nd-web-home-next.js/.next/cache/webpack/server-production/0.pack',
17:20:07.011 dest: '/opt/buildhome/repo/apps/nd-web-home-next.js/.open-next/.next/cache/webpack/server-production/0.pack'
17:20:07.011 }
can anyone help me resolve this error? do i have to pay for a service to get storage? thanks
No description
37 Replies
Walshy
Walshy•2w ago
Hey, could you share the build ID? It's the UUID in the URL
Rohil
RohilOP•2w ago
sure give me min this one? - b4fd1c8c-a5ec-4b15-b0c3-ddb363bde496
Walshy
Walshy•2w ago
Yep thanks, let me send this to the team
Rohil
RohilOP•2w ago
Thank you so much We are on a paid plan since yesterday because we thought we were exceeding the worker limit It still gives us the same error
Walshy
Walshy•2w ago
Yeah paid plan is for Worker size, this is space during the build - I've passed it onto the team and should hear from them soon
Rohil
RohilOP•2w ago
oh okay - thank you
Walshy
Walshy•2w ago
Out of interest, how big is this Next project?
Rohil
RohilOP•2w ago
I analyzed the bundle the client size is 3.27 mb it says
Rohil
RohilOP•2w ago
No description
Rohil
RohilOP•2w ago
When i do deploy locally in my terminal it works - but it does give me this red number
Rohil
RohilOP•2w ago
No description
Walshy
Walshy•2w ago
So not a super large project either, huh, thanks!
Rohil
RohilOP•2w ago
yeah if you dont mind, can you tell me why these numbers are in red?
Walshy
Walshy•2w ago
Because it's over 1 MiB
Rohil
RohilOP•2w ago
oh okay Any update?
Walshy
Walshy•2w ago
Team is US they're only just going to be starting to come online about now. Will be a a little bit longer before I have an update
Rohil
RohilOP•2w ago
Oh okay got it
Walshy
Walshy•2w ago
The limit here is not currently easily changeable, I'm gonna track this as an escalation to drive this to a solution.
Rohil
RohilOP•2w ago
Oh.. does this mean it will take time? we wanted to deploy our site to production
Walshy
Walshy•2w ago
Yeah unfortunately, for now if you are able to reduce the size of your repo/application at all. If you have any large dependencies unused or like a large image or something, anything you can do to just reduce some disk usage
Rohil
RohilOP•2w ago
oh okay. can you tell me how small should the bundle size be?
Walshy
Walshy•2w ago
It's not the resulting bundle, it's just the total disk space so everything in your repo and things installed/built
Rohil
RohilOP•2w ago
oh okay. i will try to see what i can do. thank you for the help
Walshy
Walshy•2w ago
Apologies for the issue, I'll make sure we can get this resolved
Rohil
RohilOP•2w ago
Thank you if you can update me here again that'll be great if this was resolved
Walshy
Walshy•2w ago
Will do!
Rohil
RohilOP•2w ago
ty 🙂
Walshy
Walshy•2w ago
Wait which account is this on? I don't see any Workers in your account (one linked to the forums)
Rohil
RohilOP•2w ago
we are a 3 member team using the dashboard as super admins xxxx this is the main account which invited us to join - [email protected]
Walshy
Walshy•2w ago
So the Workers live on that main account?
Rohil
RohilOP•2w ago
Yea that account purchased the paid plan also
Walshy
Walshy•2w ago
Ah yep I see, perfect - thank you! (pls remove the emails - they're considered PII and generally we don't want you to get spammed by bots)
Rohil
RohilOP•2w ago
okay yeah removed it btw just guessing - we are using a mono repo but because we were facing some errors when we used cloudflare, temporarily made it use local modules - but we still have the current repo inside of a mon repo - do you think this could be the size issue? because we do additional 2 repos and they have their own assets etc
Walshy
Walshy•2w ago
Possibly, I don't remember the specifics for how we handle monorepos
Rohil
RohilOP•2w ago
oh okay i will try to move it outside and try to do a build again
Walshy
Walshy•2w ago
Spoke to the team some more, it's gonna be more of a longer-term change so yeah I'd avise trying to figure out where your disk usage is coming from and reducing that. du can be very helpful for tha
Rohil
RohilOP•2w ago
understood. thanks for updating. ATM we are trying moving our repo out of the mone repo and testing it. if it works we will use it as it is (solo) temporarily we do have reusable components that we are sharing but for now we have to move it inside our solo repo but really hoping the longer-term change comes soon 🙂 tested it with solo repo, still got the same error

Did you find this page helpful?