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]: internal error: entered unreachable code #7602

Closed
Thebarda opened this issue Aug 16, 2024 · 2 comments · Fixed by #7609
Closed

[Bug]: internal error: entered unreachable code #7602

Thebarda opened this issue Aug 16, 2024 · 2 comments · Fixed by #7609
Assignees
Labels
bug Something isn't working

Comments

@Thebarda
Copy link

Thebarda commented Aug 16, 2024

System Info

System:
OS: macOS 14.5
CPU: (8) x64 Intel(R) Core(TM) i7-1068NG7 CPU @ 2.30GHz
Memory: 2.04 GB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.11.1 - ~/.nvm/versions/node/v20.11.1/bin/node
npm: 10.2.4 - ~/.nvm/versions/node/v20.11.1/bin/npm
pnpm: 8.15.7 - ~/.nvm/versions/node/v20.11.1/bin/pnpm
Browsers:
Chrome: 127.0.6533.120
Safari: 17.5

Details

Hello,
I've tried to update axios to 1.7.4 and here is the result of the production build.

Panic occurred at runtime. Please file an issue on GitHub with the backtrace below: https://github.com/web-infra-dev/rspack/issues
Message:  internal error: entered unreachable code
Location: crates/rspack_plugin_javascript/src/dependency/esm/provide_dependency.rs:79

Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering.
Run with RUST_BACKTRACE=full to include source snippets.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 1: _napi_register_module_v1
    at <unknown source file>
 2: _napi_register_module_v1
    at <unknown source file>
 3: _napi_register_module_v1
    at <unknown source file>
 4: _napi_register_module_v1
    at <unknown source file>
 5: _napi_register_module_v1
    at <unknown source file>
 6: _wasmer_vm_imported_memory32_atomic_notify
    at <unknown source file>
 7: _wasmer_vm_imported_memory32_atomic_notify
    at <unknown source file>
 8: _napi_register_module_v1
    at <unknown source file>
 9: _napi_register_module_v1
    at <unknown source file>
10: _napi_register_module_v1
    at <unknown source file>
11: _napi_register_module_v1
    at <unknown source file>
12: _napi_register_module_v1
    at <unknown source file>
13: _napi_register_module_v1
    at <unknown source file>
14: _napi_register_module_v1
    at <unknown source file>
15: _napi_register_module_v1
    at <unknown source file>
16: _napi_register_module_v1
    at <unknown source file>
17: _napi_register_module_v1
    at <unknown source file>
18: _napi_register_module_v1
    at <unknown source file>
19: _napi_register_module_v1
    at <unknown source file>
20: _napi_register_module_v1
    at <unknown source file>
21: _napi_register_module_v1
    at <unknown source file>
22: _napi_register_module_v1
    at <unknown source file>
23: _napi_register_module_v1
    at <unknown source file>
24: _wasmer_vm_imported_memory32_atomic_notify
    at <unknown source file>
25: _napi_register_module_v1
    at <unknown source file>
26: _napi_register_module_v1
    at <unknown source file>
27: _napi_register_module_v1
    at <unknown source file>
28: _napi_register_module_v1
    at <unknown source file>
29: __pthread_start
    at <unknown source file>
 ELIFECYCLE  Command failed.

Reproduce link

No response

Reproduce Steps

  1. Clone this repo: https://github.com/centreon/centreon
  2. Go to centreon/centreon and install dependencies using pnpm@8
  3. Update axios using pnpm update axios@1.7.4
  4. Build using pnpm centreon:build
  5. -> You can find the same error message
@Thebarda Thebarda added bug Something isn't working pending triage The issue/PR is currently untouched. labels Aug 16, 2024
@JSerFeng JSerFeng self-assigned this Aug 19, 2024
@JSerFeng
Copy link
Collaborator

It's a bug. The real reason for your issue is process/browser cannot be resolved from 'axios', because if the provided dependency is relative path

However due to the default errors are all batched, the build process is not finished here, causing some UB in the seal phase

It is resolved based on current context, and axios do not have process dependency

So make sure use right configuration

image

I'll fix this unreadable panic message, thanks for providing detailed repro ❤️

@JSerFeng JSerFeng removed the pending triage The issue/PR is currently untouched. label Aug 19, 2024
@Thebarda
Copy link
Author

Thanks for the resolution ❤️

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

Successfully merging a pull request may close this issue.

2 participants