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]: lightningcss color internal error #7789

Open
beliefgp opened this issue Sep 4, 2024 · 6 comments
Open

[Bug]: lightningcss color internal error #7789

beliefgp opened this issue Sep 4, 2024 · 6 comments
Assignees
Labels
bug Something isn't working pending triage The issue/PR is currently untouched.

Comments

@beliefgp
Copy link

beliefgp commented Sep 4, 2024

System Info

System:
OS: macOS 14.5
CPU: (8) arm64 Apple M3
Memory: 16.00 GB
Binaries:
Node: 18.20.4
npm: 10.7.0
pnpm: 9.9.0
Browsers:
Chrome: 128.0.6613.114

Details

import 'pdfjs-dist/web/pdf_viewer.css';

lightningcss throw error when use pdf_viewer.css. webpack is ok.

Message: internal error: entered unreachable code
Location: index.crates.io-6f17d22bba15001f/lightningcss-1.0.0-alpha.58/src/values/color.rs:3225

Reproduce link

No response

Reproduce Steps

rsbuild build

@beliefgp beliefgp added bug Something isn't working pending triage The issue/PR is currently untouched. labels Sep 4, 2024
@JSerFeng JSerFeng self-assigned this Sep 4, 2024
@JSerFeng
Copy link
Collaborator

JSerFeng commented Sep 4, 2024

webpack is ok.

Did you use this loader ?

@JSerFeng
Copy link
Collaborator

JSerFeng commented Sep 4, 2024

Can you try add a targets config to it, I tried and compiled successfully, I'm not sure if this is a bug of lightningcss

@beliefgp
Copy link
Author

beliefgp commented Sep 6, 2024

i use rsbuild, enable lightningcss.

// rsbuiild.config.ts

import { defineConfig } from '@rsbuild/core';

export default defineConfig({
  source: {
    entry: {
      main: './src/index.ts'
    }
  }
});

// src/index.ts

import 'pdfjs-dist/web/pdf_viewer.css';

There are still error:
Message: internal error: entered unreachable code
Location: index.crates.io-6f17d22bba15001f/lightningcss-1.0.0-alpha.58/src/values/color.rs:3225

@iwtem
Copy link

iwtem commented Sep 27, 2024

同样遇到了类似的问题

> RUST_BACKTRACE=full rsbuild build
  Rsbuild v1.0.7

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: index.crates.io-6f17d22bba15001f/lightningcss-1.0.0-alpha.58/src/values/color.rs:3225
Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 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: _wasmer_vm_f64_nearest
    at <unknown source file>
 6: _wasmer_vm_f64_nearest
    at <unknown source file>
 7: _blake3_compress_in_place_portable
    at <unknown source file>
 8: _blake3_compress_in_place_portable
    at <unknown source file>
 9: _blake3_compress_in_place_portable
    at <unknown source file>
10: _blake3_compress_in_place_portable
    at <unknown source file>
11: _blake3_compress_in_place_portable
    at <unknown source file>
12: _blake3_compress_in_place_portable
    at <unknown source file>
13: _blake3_compress_in_place_portable
    at <unknown source file>
14: _blake3_compress_in_place_portable
    at <unknown source file>
15: _blake3_compress_in_place_portable
    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: _napi_register_module_v1
    at <unknown source file>
25: _napi_register_module_v1
    at <unknown source file>
26: _wasmer_vm_f64_nearest
    at <unknown source file>
27: _napi_register_module_v1
    at <unknown source file>
28: _napi_register_module_v1
    at <unknown source file>
29: _napi_register_module_v1
    at <unknown source file>
30: _napi_register_module_v1
    at <unknown source file>
31: _napi_register_module_v1
    at <unknown source file>
32: _napi_register_module_v1
    at <unknown source file>
33: _napi_register_module_v1
    at <unknown source file>
34: _wasmer_vm_f64_nearest
    at <unknown source file>
35: _napi_register_module_v1
    at <unknown source file>
36: _napi_register_module_v1
    at <unknown source file>
37: _napi_register_module_v1
    at <unknown source file>
38: __pthread_deallocate
    at <unknown source file>
 ELIFECYCLE  Command failed.

@iwtem
Copy link

iwtem commented Sep 27, 2024

找到了一个解决方法,但是不清楚具体原因,发现把 output.copy 这个配置去掉,就可以打包成功。

@iwtem
Copy link

iwtem commented Sep 29, 2024

找到了一个解决方法,但是不清楚具体原因,发现把 output.copy 这个配置去掉,就可以打包成功。

具体见:#8017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pending triage The issue/PR is currently untouched.
Projects
None yet
Development

No branches or pull requests

3 participants