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

PDFJS-DIST bug when using dev mode with Turbopack #66612

Closed
nike1v opened this issue Jun 6, 2024 · 2 comments
Closed

PDFJS-DIST bug when using dev mode with Turbopack #66612

nike1v opened this issue Jun 6, 2024 · 2 comments
Labels
bug Issue was opened via the bug report template. Developer Experience Issues related to Next.js logs, Error overlay, etc. locked Module Resolution Module resolution (CJS / ESM, module resolving)

Comments

@nike1v
Copy link

nike1v commented Jun 6, 2024

Link to the code that reproduces this issue

https://codesandbox.io/p/devbox/ancient-cache-7lj262

To Reproduce

Create basic Next app.
Install pdfjs-dist package and import it import * as pdfjs from "pdfjs-dist";.
Make component with import or any parent component use "use client" directive.
Catch an error.

Current vs. Expected behavior

The previous versions of pdfjs-dist (tested pre 4.0) worked fine with either turbo dev or webpack dev modes.

Provide environment information

Operating System:
  Platform: linux
  Arch: x64
  Version: #1 SMP Thu Jan 11 04:09:03 UTC 2024
  Available memory (MB): 16000
  Available CPU cores: 2
Binaries:
  Node: 20.12.2
  npm: 10.5.0
  Yarn: N/A
  pnpm: 9.1.4
Relevant Packages:
  next: 14.2.3 // Latest available version is detected (14.2.3).
  eslint-config-next: 14.1.2
  react: 18.3.1
  react-dom: 18.3.1
  typescript: 5.4.5
Next.js Config:
  output: standalone

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

Developer Experience, Module Resolution

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

next dev (local)

Additional context

I have started to face this issue when updated pdfjs-dist to latest version (4.3.136) from the pre 4 version.
This is only occurs when i start dev mode via next dev --turbo and component with import OR any parent components using "use client" directive.
image

@nike1v nike1v added the bug Issue was opened via the bug report template. label Jun 6, 2024
@github-actions github-actions bot added Developer Experience Issues related to Next.js logs, Error overlay, etc. Module Resolution Module resolution (CJS / ESM, module resolving) labels Jun 6, 2024
@husseinraoouf
Copy link

this is duplicate of #65406 it is better to track issue in one place

Copy link
Contributor

github-actions bot commented Aug 8, 2024

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 added the locked label Aug 8, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 8, 2024
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. Developer Experience Issues related to Next.js logs, Error overlay, etc. locked Module Resolution Module resolution (CJS / ESM, module resolving)
Projects
None yet
Development

No branches or pull requests

3 participants