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

Misleading error message when request is "" #3180

Closed
Tracked by #4327
IWANABETHATGUY opened this issue May 17, 2023 · 6 comments
Closed
Tracked by #4327

Misleading error message when request is "" #3180

IWANABETHATGUY opened this issue May 17, 2023 · 6 comments
Assignees
Labels
bug Something isn't working good first issue Good for newcomers team The issue/pr is created by the member of Rspack.

Comments

@IWANABETHATGUY
Copy link
Contributor

System Info

system unrelated

Details

import {} from '';

rspack will throw error:

'should have context', crates/rspack_plugin_externals/src/plugin.rs:126:16

Reproduce link

No response

Reproduce Steps

  1. npm create @rspack/cli@latest
  2. change index.js to above
  3. pnpm build
@IWANABETHATGUY IWANABETHATGUY added bug Something isn't working pending triage The issue/PR is currently untouched. labels May 17, 2023
@github-actions github-actions bot added the team The issue/pr is created by the member of Rspack. label May 17, 2023
@stale
Copy link

stale bot commented Jul 16, 2023

This issue has been automatically marked as stale because it has not had recent activity. If this issue is still affecting you, please leave any comment (for example, "bump"). We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment!

@stale stale bot added the stale label Jul 16, 2023
@stale stale bot removed the stale label Sep 12, 2023
@hardfist
Copy link
Contributor

bump

@Hamzakh777
Copy link
Contributor

assign it to me @hardfist

@hardfist
Copy link
Contributor

thanks

@Hamzakh777
Copy link
Contributor

Hamzakh777 commented Sep 28, 2023

@hardfist it seems now the compiler is throwing a different error:
Screenshot 2023-09-28 at 16 47 07
This is coming from this line: https://github.com/web-infra-dev/rspack/blob/main/crates/rspack_core/src/normal_module_factory.rs#L247
Should we use ModuleFactoryResult to return the error instead?

I believe this should be resolved somewhere in this file: https://github.com/web-infra-dev/rspack/blob/main/crates/rspack_plugin_javascript/src/dependency/esm/harmony_import_dependency.rs, let me know what you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers team The issue/pr is created by the member of Rspack.
Projects
None yet
Development

No branches or pull requests

5 participants