vercel / vercel/next.js

Module '"next" has no exported member "X" (eg, 'Image', 'NextConfig').

Open
#71,889 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug Module Resolution
Dominant language
JavaScript
Stars
142k
Forks
32.4k
Avg merge
2d 14h
Merged PRs (30d)
351

Description

Link to the code that reproduces this issue

https://github.com/nextui-org/next-app-template

To Reproduce
  1. Upgrade to v15 from v14
  2. Enable turbopack
  3. start dev server
    *using typescript
Current vs. Expected behavior

Expected behevior

  • Import stuff (like Image, Metadata) from next package

Currently

  • you can't

Though you can: (Fix)

  1. Disable turbopack
  2. start dev server
Provide environment information
Operating System:
  Platform: linux
  Arch: x64
  Version: #1 ZEN SMP PREEMPT_DYNAMIC Tue, 22 Oct 2024 18:31:33 +0000
Binaries:
  Node: 20.18.0
  npm: N/A
  Yarn: N/A
  pnpm: 9.12.2
Relevant Packages:
  next: 15.0.1
  eslint-config-next: 15.0.1
  react: 19.0.0-rc-cae764ce-20241025
  react-dom: 19.0.0-rc-cae764ce-20241025
  typescript: 5.6.3
Which area(s) are affected? (Select all that apply)

Module Resolution

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

next dev (local)

Additional context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked next-app-template and reproduce the issue by upgrading from v14 to v15, enabling Turbopack, and running the local next dev stage with TypeScript. Check how imports such as Image and Metadata from the next package are resolved, then verify that these imports type-check and work with Turbopack enabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
next.js, typescript
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.