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]: Panic occurred at runtime - Message: should have module graph module #6762

Closed
bmoellers opened this issue Jun 10, 2024 · 4 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@bmoellers
Copy link

System Info

System:
OS: macOS 14.5
CPU: (10) arm64 Apple M1 Max
Memory: 9.82 GB / 64.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.10.0 - ~/.nvm/versions/node/v20.10.0/bin/node
Yarn: 1.22.19 - /opt/homebrew/bin/yarn
npm: 10.2.3 - ~/.nvm/versions/node/v20.10.0/bin/npm
pnpm: 8.15.4 - /opt/homebrew/bin/pnpm
Browsers:
Chrome: 125.0.6422.142
Edge: 125.0.2535.92
Safari: 17.5

Details

After upgrading Modern JS to version 2.52.0 I get the following error:

           Panic occurred at runtime. Please file an issue on GitHub with the backtrace below: https://github.com/web-infra-dev/rspack/issues

drop-in-ui:dev: Message: should have module graph module
drop-in-ui:dev: Location: crates/rspack_core/src/module_graph/mod.rs:563
drop-in-ui:dev:
drop-in-ui:dev: Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering.
drop-in-ui:dev: Run with RUST_BACKTRACE=full to include source snippets.
drop-in-ui:dev: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
drop-in-ui:dev: 1: _napi_register_module_v1
drop-in-ui:dev: at
drop-in-ui:dev: 2: _napi_register_module_v1
drop-in-ui:dev: at
drop-in-ui:dev: 3: _napi_register_module_v1
drop-in-ui:dev: at
drop-in-ui:dev: 4: _napi_register_module_v1
drop-in-ui:dev: at
drop-in-ui:dev: 5: _napi_register_module_v1
drop-in-ui:dev: at
drop-in-ui:dev: 6: _wasmer_vm_imported_memory32_atomic_notify
drop-in-ui:dev: at
drop-in-ui:dev: 7: _wasmer_vm_imported_memory32_atomic_notify
drop-in-ui:dev: at
drop-in-ui:dev: 8: _napi_register_module_v1
drop-in-ui:dev: at
drop-in-ui:dev: 9: _napi_register_module_v1
drop-in-ui:dev: at
drop-in-ui:dev: 10: _napi_register_module_v1
drop-in-ui:dev: at
drop-in-ui:dev: 11: _napi_register_module_v1
drop-in-ui:dev: at
drop-in-ui:dev: 12: _napi_register_module_v1
drop-in-ui:dev: at
drop-in-ui:dev: 13: _napi_register_module_v1
drop-in-ui:dev: at
drop-in-ui:dev: 14: _napi_register_module_v1
drop-in-ui:dev: at
drop-in-ui:dev: 15: _napi_register_module_v1
drop-in-ui:dev: at
drop-in-ui:dev: 16: _napi_register_module_v1
drop-in-ui:dev: at
drop-in-ui:dev: 17: _napi_register_module_v1
drop-in-ui:dev: at
drop-in-ui:dev: 18: _napi_register_module_v1
drop-in-ui:dev: at
drop-in-ui:dev: 19: _napi_register_module_v1
drop-in-ui:dev: at
drop-in-ui:dev: 20: _napi_register_module_v1
drop-in-ui:dev: at
drop-in-ui:dev: 21: __pthread_joiner_wake
drop-in-ui:dev: at
error Command failed with signal "SIGABRT".

With a bit of digging it appears that there seems to be an issue with prependPlugins in rspack config for Modern JS when using the rspack.CopyRspackPlugin. If I remove that section it will fix the error.

I am unable to share the original problem repository that breaks on yarn dev because it is proprietary for our company and they will not give permission.

However I was able to create a new modern repository (see repro link). It will still run fine on modern dev but if you change something in modern.config.js and save it while modern dev is still running, it will have the same error, or at least the same stack that looks the same.

I was unsure if this is the right place or if it should be reported in Modern JS but the error said to post the issue here.

Reproduce link

https://github.com/bmoellers/modern-upgrade-error

Reproduce Steps

  • yarn dev
  • make a simple change to modern.config.ts
  • should see error in console where yarn dev was run

Original issue was seen just when running yarn dev but the above was the only way I could reproduce it.

@bmoellers bmoellers added bug Something isn't working pending triage The issue/PR is currently untouched. labels Jun 10, 2024
@jerrykingxyz
Copy link
Collaborator

@bmoellers i can not reproduce panic from your repo. Can you try 0.7.2 to check if it is fixed?

@bmoellers
Copy link
Author

I will see if I can override it somehow but we are using the rspack version bundled with Modern JS and not a direct include. I can probably include and alias it so that even Modern JS requires that version or I can just wait for a new Modern JS version and see if that fixes it. Not in a super hurry to upgrade everything but want to keep things as close to the current version as possible.

@jerrykingxyz jerrykingxyz removed the pending triage The issue/PR is currently untouched. label Jun 12, 2024
@jerrykingxyz jerrykingxyz self-assigned this Jun 12, 2024
@vianvio
Copy link

vianvio commented Jun 16, 2024

same issue +1, it is caused when I use rspack with module federation.
if I remove the tools config, all things work fine

@vianvio
Copy link

vianvio commented Jun 16, 2024

same issue +1, it is caused when I use rspack with module federation. if I remove the tools config, all things work fine

just tried 0.7.2, hmr got fixed :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants