Skip to content

[Turbopack] Importing local dependencies does not work and resolveAlias is not working correctly #82040

@kolserdav

Description

@kolserdav

Link to the code that reproduces this issue

https://github.com/kolserdav/turbopack-issue

To Reproduce

  1. Clone repository
git clone https://github.com/kolserdav/turbopack-issue
  1. Install dependencies:
cd app
npm i
  1. Run dev:
npm run dev

Current vs. Expected behavior

With Turbopack there is an error:

Module not found: Can't resolve './path/to/projects/turbopack-issue/lib'

When use local modules like:

  "dependencies": {
    "lib": "file:../lib"
  }

Provide environment information

Operating System:
  Platform: linux
  Arch: x64
  Version: #1 SMP PREEMPT_DYNAMIC Thu, 17 Jul 2025 20:46:35 +0000
  Available memory (MB): 15935
  Available CPU cores: 4
Binaries:
  Node: 22.16.0
  npm: 11.4.2
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  next: 15.4.4 // Latest available version is detected (15.4.4).
  eslint-config-next: N/A
  react: 19.1.0
  react-dom: 19.1.0
  typescript: N/A
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)

Additional context

Maybe I used resolveAlias incorrectly, but I tried different ways and didn't find a solution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    TurbopackRelated to Turbopack with Next.js.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions