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

Puppeteer Fails build when loaded into middleware #62899

Open
mildfuzz opened this issue Mar 5, 2024 · 0 comments
Open

Puppeteer Fails build when loaded into middleware #62899

mildfuzz opened this issue Mar 5, 2024 · 0 comments
Labels
bug Issue was opened via the bug report template. Runtime Related to Node.js or Edge Runtime with Next.js.

Comments

@mildfuzz
Copy link

mildfuzz commented Mar 5, 2024

Link to the code that reproduces this issue

Sandbox

To Reproduce

run npm run dev

Current vs. Expected behavior

Currently, build fails

it should take a PDF of the index page.

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 23.3.0: Wed Dec 20 21:30:44 PST 2023; root:xnu-10002.81.5~7/RELEASE_ARM64_T6000
Binaries:
  Node: 20.11.1
  npm: 10.4.0
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  next: 14.1.0
  eslint-config-next: 14.1.0
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.3.3
Next.js Config:
  output: N/A

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

Middleware / Edge (API routes, runtime)

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

next dev (local), next build (local)

Additional context

I have seen suggested that the solution is here but I have added the serverComponentsExternalPackages property to next.config.js, and I also note that puppeteer is on the list of automatic exclusions, so seems to be middleware specific?

@mildfuzz mildfuzz added the bug Issue was opened via the bug report template. label Mar 5, 2024
@github-actions github-actions bot added the Runtime Related to Node.js or Edge Runtime with Next.js. label Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue was opened via the bug report template. Runtime Related to Node.js or Edge Runtime with Next.js.
Projects
None yet
Development

No branches or pull requests

1 participant