Skip to content

Error: ENAMETOOLONG: name too long when deploying to Vercel #69

@simhol

Description

@simhol

Apparently, some post images coming in via Unsplash generate filenames that are too long. It doesn't happen with every image though, but for this specific one:

https://images.unsplash.com/flagged/photo-1563536314719-2e812e896f50?ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80

Error message from Vercel:
Could not write to file cache. This is expected during ISR, but not during deploy. Error: ENAMETOOLONG: name too long, open '/vercel/workpath0/.cache/https%3A%2F%2Fimages.unsplash.com%2Fflagged%2Fphoto-1563536310477-c7b4e3a800c2%3Fcrop%3Dentropy%26cs%3Dtinysrgb%26fit%3Dmax%26fm%3Djpg%26ixid%3DMnwxMTc3M3wwfDF8c2VhcmNofDQxfHxwcm9ncmFtbWVyfGVufDB8fHx8MTYxNzYwNTE4Mw%26ixlib%3Drb-1.2.1%26q%3D80%26w%3D2000.txt'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions