Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 0.4.1 prevents Vercel to build the project #1157

Open
5 tasks done
ozgur-dogan opened this issue Nov 1, 2024 · 10 comments
Open
5 tasks done

Version 0.4.1 prevents Vercel to build the project #1157

ozgur-dogan opened this issue Nov 1, 2024 · 10 comments
Labels
bug Something isn't working

Comments

@ozgur-dogan
Copy link

ozgur-dogan commented Nov 1, 2024

Describe the bug

When the library updated from 0.4.0 to 0.4.1, Vercel builds throws an error as below. Local builds complete without any issue.

Next.js version 14.2.16

Error: ENOENT: no such file or directory, lstat '/vercel/path0/.next/export-detail.json'

Reproduction

Update the library to 0.4.1 and push to Vercel for build

System Info

Vercel with Node 20
Next.js version 14.2.16
next-swagger-doc 0.4.1

Used Package Manager

npm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.
@mbramani
Copy link

mbramani commented Nov 1, 2024

I’m also experiencing this issue after updating next-swagger-doc from 0.4.0 to 0.4.1. The Vercel build fails with the following error, although local builds complete successfully:

Error: ENOENT: no such file or directory, lstat '/vercel/path0/.next/export-detail.json'

Reverting back to version 0.4.0 fixed the problem, so it seems to be related to the changes in 0.4.1.

Here’s my repository for reference: GitHub Repo.

@jellydn jellydn added the bug Something isn't working label Nov 2, 2024
@jellydn
Copy link
Owner

jellydn commented Nov 2, 2024

Thank you all. I will check and get back on this issue soon.

@jellydn
Copy link
Owner

jellydn commented Nov 7, 2024

Hi @mbramani Could you show me the full error logs on Vercel? Thanks.

@gadcam
Copy link

gadcam commented Nov 7, 2024

Hello @jellydn,
I had to downgrade for the same reason and it seems to be the only difference in the build logs
image

What information would be useful to debug this ?

@jellydn
Copy link
Owner

jellydn commented Nov 7, 2024

Ok, let me deploy the examples app to Vercel and test. Thanks.

@jellydn
Copy link
Owner

jellydn commented Nov 7, 2024

I could reproduce the issue with examples/next14-app on Vercel as well.

https://paste.ofcode.org/cDsjZqxbj2rPT8RFvPGNM6

I'm not sure what is the issue in this case. There is a similar issue here https://github.com/orgs/vercel/discussions/6575

@jmikedupont2
Copy link

jmikedupont2 commented Nov 17, 2024

I found that "tar" produces the problem https://vercel.community/t/calling-tar-x-causeserror-enoent-no-such-file-or-directory-lstat-next-export-detail-json/2007
by removing its usage I could work around the issue

@martinhj
Copy link

martinhj commented Nov 21, 2024

After upgrading to next 15 I experienced the above problem also w/ next-swagger-doc v4.0. Before the above error there was also some gyp warnings from building tree-sitter (required by next-swagger-doc), even if the tree-sitter build completed sucessfully (https://pastebin.com/6TYpZ7w7).

I was not able to build the next app on vercel before removing the next-swagger-doc module from the project.

@KDercksen
Copy link

I'm using next 14.2.15, downgrading next-swagger-doc to 0.4.0 fixed the issue for me.

@TheMehranKhan
Copy link

I recently encountered the same issue on Vercel. My local build worked fine, but deploying to Vercel failed consistently, even after trying the following:
• Upgraded to Next.js 14.2.15
• Used next-stagger-doc 0.4.0
• Cleared the build cache and redeployed

Screenshot 2024-12-04 at 11 32 32 PM Unfortunately, none of these attempts resolved the issue.

What ultimately solved the problem:

Removing the next-stagger-doc package resolved the build error on Vercel.

Hope this helps others facing the same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

8 participants