Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: "should have module" error when project is placed in a directory with a long path on windows #8407

Open
Xellon opened this issue Nov 12, 2024 · 0 comments
Labels
bug Something isn't working pending triage The issue/PR is currently untouched.

Comments

@Xellon
Copy link

Xellon commented Nov 12, 2024

System Info

System:
OS: Windows 11 10.0.22631
CPU: (16) x64 Intel(R) Core(TM) i9-10885H CPU @ 2.40GHz
Memory: 14.51 GB / 31.85 GB
Binaries:
Node: 20.15.1 - C:\Program Files\nodejs\node.EXE
npm: 10.7.0 - C:\Program Files\nodejs\npm.CMD
pnpm: 9.9.0 - ~\AppData\Roaming\npm\pnpm.CMD
Browsers:
Chrome: 130.0.6723.117
Edge: Chromium (127.0.2651.74)
Internet Explorer: 11.0.22621.3527
npmPackages:
@rspack/core: ^1.0.14 => 1.0.14

Details

rsbuild build panics with the error bellow when project is placed in a directory with a long path on windows. We also use pnpm

  Rsbuild v1.0.16

● web ━━━━━━━━━━━━━━━━━━━━━━━━━ (63%) building commonjs|C:\Users\xxxxxx.xxxxxxxxxx.xxxxxxxxx\Projects\xxxxxxxxxxxxx\src\Syn...
Panic occurred at runtime. Please file an issue on GitHub with the backtrace below: https://github.com/web-infra-dev/rspack/issues
Message:  should have module
Location: crates\rspack_core\src\compiler\module_executor\execute.rs:81

Moving project to the root directory fixes the issue. If the error can't be eliminated there should at least be a better error message.

Reproduce link

No response

Reproduce Steps

Tried to reproduce it with https://github.com/web-infra-dev/rspack-repro by placing it in a path with a long name, but couldn't. It might be caused by a combination of pnpm symlinks with deeply nested packages and a long base directory name.

@Xellon Xellon added bug Something isn't working pending triage The issue/PR is currently untouched. labels Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pending triage The issue/PR is currently untouched.
Projects
None yet
Development

No branches or pull requests

1 participant