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

[Feature]: improve error message when importing uri like request, eg virtual:uno.css, that cannot be resolved #6290

Closed
xc2 opened this issue Apr 19, 2024 · 1 comment
Labels
duplicated The issue/PR is duplicate of others

Comments

@xc2
Copy link
Collaborator

xc2 commented Apr 19, 2024

What problem does this feature solve?

Source

// case 1 typicall happens on migrating from other builders
import "virtual:uno.css"
// case 2 and 3
import * as NodeFS from "node:fs" // target: "web"
import * as BunFS from "bun:fs" // target: "web"

Got


Panic occurred at runtime. Please file an issue on GitHub with the backtrace below: https://github.com/web-infra-dev/rspack/issues
Message:  content should be available
Location: /Users/webinfra/ec2-macos-ci-0/_work/rspack/rspack/crates/rspack_loader_runner/src/runner.rs:446

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: _napi_register_module_v1
    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: __pthread_start
    at <unknown source file>
 ELIFECYCLE  Command failed.

What does the proposed API of configuration look like?

Expected

Something more friendly that telling what happened and recommended solution

@xc2 xc2 added feat New feature or request pending triage The issue/PR is currently untouched. labels Apr 19, 2024
@SoonIter
Copy link
Member

SoonIter commented May 3, 2024

After #6404, it seems this issue has been solved

image image image

@xc2 xc2 added duplicated The issue/PR is duplicate of others and removed feat New feature or request pending triage The issue/PR is currently untouched. labels May 6, 2024
@xc2 xc2 closed this as completed May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicated The issue/PR is duplicate of others
Projects
None yet
Development

No branches or pull requests

2 participants