Module '"next" has no exported member "X" (eg, 'Image', 'NextConfig').
Open
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
- Upgrade to
v15fromv14 - Enable turbopack
- start dev server
*using typescript
Current vs. Expected behavior
Expected behevior
- Import stuff (like Image, Metadata) from
nextpackage
Currently
- you can't
Though you can: (Fix)
- Disable turbopack
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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