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. with v 0.5.2 on Windows #5592

Closed
pushkargupta9807 opened this issue Feb 3, 2024 · 8 comments
Closed

[Bug]: Panic occurred at runtime. with v 0.5.2 on Windows #5592

pushkargupta9807 opened this issue Feb 3, 2024 · 8 comments
Labels
bug Something isn't working need reproduction

Comments

@pushkargupta9807
Copy link

System Info

Windows, rspack v 0.5.2

Details

Hello, I ran into the below issue when running the rspack serve command to start an application on a windows machine. However I do not run into this issue on a Mac device.

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: C:\Users\Administrator.cargo\registry\src\index.crates.io-6f17d22bba15001f\oxc_resolver-1.2.2\src\path.rs:69

Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering.
Run with RUST_BACKTRACE=full to include source snippets.
● ━━━━━━━━━━━━━━━━━━━━━━━━━ (60%) building builtin:swc-loader??ruleSet[1].rules[13].use[0]!D:\source\cd━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1: napi_register_module_v1
at
2: napi_register_module_v1
at
3: napi_register_module_v1
at
4: napi_register_module_v1
at
● ━━━━━━━━━━━━━━━━━━━━━━━━━ (60%)

Reproduce link

No response

Reproduce Steps

N/A

@pushkargupta9807 pushkargupta9807 added bug Something isn't working pending triage The issue/PR is currently untouched. labels Feb 3, 2024
@pushkargupta9807 pushkargupta9807 changed the title [Bug]: Panic occurred at runtime. with v 0.5.1 on Windows [Bug]: Panic occurred at runtime. with v 0.5.2 on Windows Feb 3, 2024
@h-a-n-a h-a-n-a added need reproduction and removed pending triage The issue/PR is currently untouched. labels Feb 4, 2024
Copy link
Contributor

github-actions bot commented Feb 4, 2024

Hello @pushkargupta9807, sorry we can't investigate the problem further without reproduction demo, please provide a repro demo by forking rspack-repro, or provide a minimal GitHub repository by yourself. Issues labeled by need reproduction will be closed if no activities in 14 days.

@pushkargupta9807
Copy link
Author

pushkargupta9807 commented Feb 4, 2024

@h-a-n-a I am not sure how to create a repro for this, since this error is very specific on Windows and not on MacOS. Someone else also reported the same issue:
rspack

I thought anyone using 0.5.2 version on windows should run into this issue.

@hardfist
Copy link
Contributor

hardfist commented Feb 6, 2024

cc @Boshen this panic raises from oxc_resolver, do you have any clue?

@Boshen
Copy link
Contributor

Boshen commented Feb 6, 2024

oxc-project/oxc-resolver#79

I'll get it fixed.

@pushkargupta9807
Copy link
Author

Thanks @Boshen

@Boshen
Copy link
Contributor

Boshen commented Feb 6, 2024

@pushkargupta9807 can you help me a bit by posting your resolve config? I have a feeling there's something similar to path.resolve(__dirname, "src"). Try use a relative path (./src) before this is fixed.

@pushkargupta9807
Copy link
Author

@Boshen there are many places where path.resolve is used.

As a matter of fact I discovered the one loader using which hits this issue.

It is the following loader :


               loader: webpackHelper.findLoader(
                 "@graphitation/embedded-document-artefact-loader/webpack"
               ),

And the way it is resolved is :

function findLoader(name) {
  return require.resolve(name, {
    paths: [
      path.resolve(process.cwd(), "node_modules"),
      path.resolve(__dirname, "../../node_modules"),
    ],
  });
}

I also tried to hard code the relative path for that loader as below, but it didnt help:


              loader:
                "../../../node_modules/@graphitation/embedded-document-artefact-loader/lib/webpack.js"

Copy link
Contributor

Since the issue was labeled with need reproduction, but no response in 14 days. This issue will be closed. Feel free to comment and reopen it if you have any further questions.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Feb 21, 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 need reproduction
Projects
None yet
Development

No branches or pull requests

4 participants