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

Vercel deployment stopped working after update from 13.5.3 to 13.5.4 #56676

Closed
1 task done
wojtekmaj opened this issue Oct 10, 2023 · 4 comments · Fixed by #56817
Closed
1 task done

Vercel deployment stopped working after update from 13.5.3 to 13.5.4 #56676

wojtekmaj opened this issue Oct 10, 2023 · 4 comments · Fixed by #56817
Labels
bug Issue was opened via the bug report template. linear: next Confirmed issue that is tracked by the Next.js team. locked

Comments

@wojtekmaj
Copy link
Contributor

wojtekmaj commented Oct 10, 2023

Link to the code that reproduces this issue

https://github.com/wojtekmaj/react-pdf/tree/main/sample/next-app

To Reproduce

  1. Get the code from the link above
  2. Try and deploy to Vercel

Current vs. Expected behavior

Vercel deployment should work.

Verify canary release

  • I verified that the issue exists in the latest Next.js canary release

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 23.0.0: Fri Sep 15 14:42:57 PDT 2023; root:xnu-10002.1.13~1/RELEASE_ARM64_T8112
Binaries:
  Node: 20.7.0
  npm: 10.1.0
  Yarn: 3.1.0
  pnpm: N/A
Relevant Packages:
  next: 13.5.4
  eslint-config-next: N/A
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.0.4
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

Not sure

Additional context

I've got multiple reports from users of react-pdf, a package to display PDF in React, that upon upgrading to Next.js 13.5.4 Vercel deployment no longer works. I've received confirmations that Next.js 13.5.3 was working fine.

I have, frankly, zero experience with Vercel, I'm not sure how would I be able to test deployment there, and especially can't afford paying for a Vercel account for testing purposes.

The most unusual part about react-pdf configuration in Next.js (as well as Vite, Webpack…) is the way web worker is imported:

https://github.com/wojtekmaj/react-pdf/blob/main/sample/next-app/app/Sample.tsx#L12-L15

My users report that upon upgrading to 13.5.4, this results with:

Error: File /vercel/path0/.next/server/chunks/static/media/pdf.worker.min.6a40b659.js does not exist.
--
10:17:32.381 | at Job.emitDependency (/vercel/path0/node_modules/next/dist/compiled/@vercel/nft/index.js:1:39473)
10:17:32.381 | at async Promise.all (index 10)
10:17:32.382 | at async nodeFileTrace (/vercel/path0/node_modules/next/dist/compiled/@vercel/nft/index.js:1:35430)
10:17:32.382 | at async /vercel/path0/node_modules/next/dist/build/collect-build-traces.js:251:28
10:17:32.383 | at async Span.traceAsyncFn (/vercel/path0/node_modules/next/dist/trace/trace.js:105:20)
10:17:32.383 | at async collectBuildTraces (/vercel/path0/node_modules/next/dist/build/collect-build-traces.js:123:5)
10:17:32.500 | Error: Command "npm run build" exited with 1

See: wojtekmaj/react-pdf#1630

NEXT-1683

@wojtekmaj wojtekmaj added the bug Issue was opened via the bug report template. label Oct 10, 2023
@winterlood
Copy link

winterlood commented Oct 11, 2023

Getting the same issue to me
I searched and found some relevant information.
I'm sharing it.

https://github.com/vercel/next.js/pull/56048/files#r1345651964
#56607
#56357

@alexanderkalachev
Copy link

alexanderkalachev commented Oct 13, 2023

Several people including me encountered similar problem, except our apps wasn't able to deploy on Vercel because of failing to fetch data from Sanity.
Here is a discussion: sanity-io/next-sanity#664
Downgrading from 13.5.4 to 13.5.3 enabled us to build apps on Vercel successfully.

@balazsorban44 balazsorban44 added the linear: next Confirmed issue that is tracked by the Next.js team. label Oct 13, 2023
@balazsorban44
Copy link
Member

balazsorban44 commented Oct 13, 2023

Hi, upon investigating, I can confirm that this is a regression likely caused by #56048, but I wanted to point out that it's not related to Vercel. It reproduces with next build too.

#56674 did not fix this, unfortunately, so we will have a look, thanks for reporting!

ijjk added a commit that referenced this issue Oct 13, 2023
This ensures our `readFile` handling for tracing we previously had is
maintained.

Test deployment with the provided reproduction can be seen here:
https://react-pdf-repro-jeqgyhmek-vtest314-ijjk-testing.vercel.app/

Fixes: #56676
@github-actions
Copy link
Contributor

This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue was opened via the bug report template. linear: next Confirmed issue that is tracked by the Next.js team. locked
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants