vercel / next.js

The React Framework
https://nextjs.org
MIT License
125.37k stars 26.78k forks source link

Importing `got` fails to compile with Turbopack #67282

Closed timneutkens closed 2 months ago

timneutkens commented 3 months ago

Link to the code that reproduces this issue

https://codesandbox.io/p/devbox/polished-wind-zftm49?file=%2Fapp%2Froute.ts%3A3%2C17&workspaceId=062b139a-c054-40fe-bbf5-0210d48b9dd0

To Reproduce

  1. Use import got from 'got
  2. pnpm dev --turbo
  3. Open http://localhost:3000

Current vs. Expected behavior

Current:

CleanShot 2024-06-28 at 17 23 28@2x

Expected:

No error, this require is ignored or shows a warning.

Provide environment information

Operating System:
  Platform: linux
  Arch: x64
  Version: #1 SMP PREEMPT_DYNAMIC Sun Aug  6 20:05:33 UTC 2023
  Available memory (MB): 4102
  Available CPU cores: 2
Binaries:
  Node: 20.9.0
  npm: 9.8.1
  Yarn: 1.22.19
  pnpm: 8.10.2
Relevant Packages:
  next: 15.0.0-canary.47 // Latest available version is detected (15.0.0-canary.47).
  eslint-config-next: N/A
  react: 19.0.0-rc-6f23540c7d-20240528
  react-dom: 19.0.0-rc-6f23540c7d-20240528
  typescript: 5.3.3
Next.js Config:
  output: N/A

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

Turbopack

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

next dev (local), next build (local)

Additional context

No response

github-actions[bot] commented 1 month ago

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.