Skip to content

When Target is set to es6, a rolldown warning is thrown: Warning: Could not resolve '@oxc-project/runtime/helpers/asyncToGenerator' #140

@ZaneL1u

Description

@ZaneL1u

Describe the bug

Repro steps:

  1. Clone repo
  2. run pnpm install
  3. run pnpm build
❯ pnpm build

> ts-starter@0.0.0 build /Users/zaneliu/Projects/open-source/tsdown-minimal-reproduction
> tsdown

ℹ tsdown v0.9.1 powered by rolldown v1.0.0-beta.7                                                                                                                                                                                                                                                                                                                                                                     tsdown 18:59:13
ℹ Using tsdown config: /Users/zaneliu/Projects/open-source/tsdown-minimal-reproduction/tsdown.config.ts                                                                                                                                                                                                                                                                                                               tsdown 18:59:13
ℹ entry: src/index.ts                                                                                                                                                                                                                                                                                                                                                                                                 tsdown 18:59:13
ℹ Using tsconfig: /Users/zaneliu/Projects/open-source/tsdown-minimal-reproduction/tsconfig.json                                                                                                                                                                                                                                                                                                                       tsdown 18:59:13
ℹ Cleaning output folder                                                                                                                                                                                                                                                                                                                                                                                              tsdown 18:59:13
[UNRESOLVED_IMPORT] Warning: Could not resolve '@oxc-project/runtime/helpers/asyncToGenerator' in src/index.ts
   ╭─[ src/index.ts:1:31 ]
   │
 1 │ import _asyncToGenerator from "@oxc-project/runtime/helpers/asyncToGenerator";
   │                               ───────────────────────┬───────────────────────  
   │                                                      ╰───────────────────────── Module not found, treating it as an external dependency
───╯

[UNRESOLVED_IMPORT] Warning: Could not resolve '@oxc-project/runtime/helpers/asyncToGenerator' in src/index.ts
   ╭─[ src/index.ts:1:31 ]
   │
 1 │ import _asyncToGenerator from "@oxc-project/runtime/helpers/asyncToGenerator";
   │                               ───────────────────────┬───────────────────────  
   │                                                      ╰───────────────────────── Module not found, treating it as an external dependency
───╯

Reproduction

https://github.com/ZaneL1u/tsdown-minimal-reproduction

System Info

System:
  OS: macOS 15.4.1
  CPU: (8) arm64 Apple M3
  Memory: 90.47 MB / 16.00 GB
  Shell: 3.7.1 - /opt/homebrew/bin/fish
Binaries:
  Node: 22.12.0 - ~/.local/state/fnm_multishells/52274_1745319243421/bin/node
  npm: 10.9.0 - ~/.local/state/fnm_multishells/52274_1745319243421/bin/npm
  pnpm: 10.8.1 - ~/.local/state/fnm_multishells/52274_1745319243421/bin/pnpm
  bun: 1.2.3 - /opt/homebrew/bin/bun
Browsers:
  Chrome: 135.0.7049.96
  Safari: 18.4

Used Package Manager

pnpm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions