Error: could not create static deployment

Hi! I am trying to run a static deplyoment. I made an index.html file and now im getting an error. Log:

2024-01-03T20:55:36Z info: Deployment: 62109465-15ef-4d95-b406-4a965d399d8b
2024-01-03T20:55:36Z info: Build: ea31791a-ea06-48e0-bd11-b58517f55cba
2024-01-03T20:55:36Z info: Connecting to builder
2024-01-03T20:55:36Z info: Deployment: 62109465-15ef-4d95-b406-4a965d399d8b
2024-01-03T20:55:36Z info: Build: ea31791a-ea06-48e0-bd11-b58517f55cba
2024-01-03T20:55:36Z info: Connecting to builder
2024-01-03T20:55:38Z info: Builder connected
2024-01-03T20:55:38Z info: Installing packages
2024-01-03T20:55:38Z info: Skipping Build as no Build command set
2024-01-03T20:55:38Z info: Looks like you're deploying '/'. Skipping directories: .config, .upm, .cache
2024-01-03T20:55:38Z info: Creating static archive
2024-01-03T20:55:38Z error: could not create static deployment
2024-01-03T20:55:38Z info: There was an issue while building the static deployment. Here is some error information: error creating archive: archive/tar: write too long

What may I do / how may I fix it?

Repl link:
https://replit.com/@LaxeGames/hmc

image

1 Like

I am having the same issue. I am getting the “write too long” message. I am building using Vite.

It will deploy if I set the public directory to dist but it does not host all the files. But when I follow the documentation to change the public directory to / or ./

Documentation says, “Note: If you want to host all files within your Repl, use ./ as the public directory.” source: https://docs.replit.com/hosting/deployments/static-deployments#configuring-your-deployment

I think maybe there is a bug in Replit where the deployment doesn’t ignore the files it should when deploying from root and ends up with “write too long”

Hi @LaxeGames. I’m doing some testing and looking into this. Thanks for the detailed description.
@LeonYoung Can you send me a public Repl as well where you get the same error? It may be the same error but it may not necessarily be the same root cause so more examples will help.

@LaxeGames So I have some updates. I want to mention that if you are using a Discord bot, then you want to use Reserved VMs. That’s the recommendation. It deployed successfully when I used a Reserved VM.

Otherwise, we think this is a symlink issue in .cache. We are working on an improvement where if the public directory is ./ we would skip all directories starting with . in static sites. So hopefully that will fix things going forward. The workaround in the meantime for folks with a similar issue is to do deploy a subdirectory as @LeonYoung mentioned.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.