这是indexloc提供的服务,不要输入任何密码
Skip to content

Type re-export in 'use server' file throws error with Turbopack (15.4.0+) #82029

@suzuki3jp

Description

@suzuki3jp

Link to the code that reproduces this issue

https://github.com/suzuki3jp/next-15.4-use-server-reexport-type-reproduction

To Reproduce

  1. npm run dev
  2. open http://localhost:3000/

Current vs. Expected behavior

Current

export type FooType = {}
"use server";

export { type FooType } from "./foo.type";

export async function fooAction() {
    return "Foo Action"
}
Image

Expected befavior

This error should not occur.

Provide environment information

Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 11 Home
  Available memory (MB): 64633
  Available CPU cores: 16
Binaries:
  Node: 20.18.0
  npm: 10.8.2
  Yarn: N/A
  pnpm: 9.5.0
Relevant Packages:
  next: 15.4.2-canary.15 // Latest available version is detected (15.4.2-canary.15).
  eslint-config-next: N/A
  react: 19.1.0
  react-dom: 19.1.0
  typescript: 5.8.3
Next.js Config:
  output: N/A

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

Server Actions

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

next dev (local)

Additional context

This error occurs in versions from 15.4.0 to 15.4.2-canary.15.
It does not occur in 15.3.5.
Additionally, this error only occurs when turbopack is enabled (next dev --turbo).
It does not occur when running next dev.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions