PDFJS-DIST bug when using dev mode with Turbopack #66612
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)
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.
The text was updated successfully, but these errors were encountered: