-
Notifications
You must be signed in to change notification settings - Fork 27.3k
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
v14.2.8 breaks pdfjs, 'canvas' not found #69912
Comments
Hi, noticed that you're using a pretty old version of pdf.js where it tries to call You can either install module.exports = {
experimental: {
serverComponentsExternalPackages: ['pdfjs-dts']
}
} This will temporarily work around on it. We're workig on better solution for it as the latest pdfjs-dts (v4) version also requires some bundler handling for |
Okay good to know, yeah im using the older version because the newer version uses some newer JS syntax and it seems a lot of my customers browsers dont like that, even with polyfills |
So its working in the repro now, but in my actual project im still getting the same error, even with updating the next config:
getting this:
Something to do with pnpm or pnpm workspaces? Thats the only real setup difference between the two repos. |
Okay, it seems to be do with using turbo on the next dev server, if I dont use turbo it works again? have updated the repro to use turbo and it breaks in local again |
backport #70330 Fixes #69912 --------- Co-authored-by: JJ Kasper <[email protected]>
We ship a fix to 14.2.14, can you try upgrading Next.js to that version? 🙏 |
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. |
Link to the code that reproduces this issue
https://github.com/JClackett/next-pdf-canvas
To Reproduce
run the dev or build command, you'll get an error.
Current vs. Expected behavior
Not break
Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 23.1.0: Mon Oct 9 21:27:24 PDT 2023; root:xnu-10002.41.9~6/RELEASE_ARM64_T6000 Available memory (MB): 32768 Available CPU cores: 8 Binaries: Node: 18.20.4 npm: 10.7.0 Yarn: 1.22.19 pnpm: 8.15.7 Relevant Packages: next: 14.2.9 // Latest available version is detected (14.2.9). eslint-config-next: N/A react: 18.3.1 react-dom: 18.3.1 typescript: 5.6.2 Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
Runtime
Which stage(s) are affected? (Select all that apply)
next dev (local), next build (local), next start (local), Vercel (Deployed)
Additional context
Reverting to 14.2.7 works, so something in 14.2.8 broke this.
You can see from my builds that as soon as it updated, it failed the builds.
The text was updated successfully, but these errors were encountered: