Skip to content

[Bug]: Crashes with sent an error! Cannot read properties of undefined (reading 'checkGCAccess') when resolution failed by rolldown-plugin-dts while running by wasm #4978

@sapphi-red

Description

@sapphi-red

Reproduction link or steps

https://stackblitz.com/edit/rolldown-rolldown-starter-stackblitz-wjaqzif8?file=rolldown.config.mjs,package.json
The following error happens when resolution failed by rolldown-plugin-dts while running by wasm:

worker (tid = 43) sent an error! Cannot read properties of undefined (reading 'checkGCAccess')
TypeError [Error]: Cannot read properties of undefined (reading 'checkGCAccess')
    at napi_reference_ref (/home/projects/rolldown-rolldown-starter-stackblitz-wjaqzif8/node_modules/.pnpm/@[email protected]/node_modules/@emnapi/core/dist/emnapi-core.cjs.js:5009:23)

The expected error is to show that the resolution failed.
This crash does not happen if dts plugin is not used.

What is expected?

The resolution failure error to be shown.

What is actually happening?

The crash happens.

System Info

StackBlitz

 System:
    OS: Linux 5.0 undefined
    CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 0 Bytes / 0 Bytes
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 20.19.1 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.8.2 - /usr/local/bin/npm
    pnpm: 8.15.6 - /usr/local/bin/pnpm
  npmPackages:
    @rolldown/browser:  1.0.0-beta.16

Any additional comments?

Reported at sxzz/rolldown-plugin-dts#50 cc @sxzz

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions