Skip to content

[Bug]: Rslib cache causes build failure when build again #12450

@emosheeep

Description

@emosheeep

System Info

System:
OS: macOS 26.2
CPU: (10) arm64 Apple M1 Pro
Memory: 108.34 MB / 32.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 24.12.0 - /Users/emosheep/.local/state/fnm_multishells/2054_1765610347612/bin/node
Yarn: 1.22.22 - /opt/homebrew/bin/yarn
npm: 11.6.2 - /Users/emosheep/.local/state/fnm_multishells/2054_1765610347612/bin/npm
pnpm: 10.24.0 - /Users/emosheep/Library/pnpm/pnpm
bun: 1.3.4 - /opt/homebrew/bin/bun
Browsers:
Chrome: 143.0.7499.109
Edge: 143.0.3650.80
Firefox: 135.0
Safari: 26.2

Details

I use rslib to pack wasm, find that the build process fails stably when there's cache exist. But the first build will succeed. When I remove node_modules/.cache/rspack, this problem solves temporarily

Image
> rslib build

  Rslib v0.18.4

info    build started...
Panic occurred at runtime. Please file an issue on GitHub with the backtrace below: https://github.com/web-infra-dev/rspack/issues: panicked at crates/rspack_plugin_wasm/src/wasm_plugin.rs:65:12:
should have wasm_filename
Panic occurred at runtime. Please file an issue on GitHub with the backtrace below: https://github.com/web-infra-dev/rspack/issues: panicked at crates/rspack_plugin_wasm/src/wasm_plugin.rs

Reproduce link

No response

Reproduce Steps

This project need rust environment.

git clone https://github.com/emosheeep/circular-dependency-scanner
pnpm install
pnpm run prepublishOnly #  First build
pnpm run build # Fails with errors pasted above

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions