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

Unable to install Compilation errors SourceMap #49

Open
pmcneil opened this issue Aug 6, 2024 · 1 comment
Open

Unable to install Compilation errors SourceMap #49

pmcneil opened this issue Aug 6, 2024 · 1 comment

Comments

@pmcneil
Copy link

pmcneil commented Aug 6, 2024

When running cargo install I get an error mismatched types building swc. See below:

cargo install --path crates/fsrt
  Installing fsrt v0.1.0 (/home/pmcneil/devel/forge-apps/FSRT/crates/fsrt)
    Updating crates.io index
     Locking 311 packages to latest compatible versions
      Adding base64 v0.21.7 (latest: v0.22.1)
      Adding base64-simd v0.7.0 (latest: v0.8.0)
      Adding browserslist-rs v0.15.0 (latest: v0.16.0)
...
     Adding windows_x86_64_msvc v0.48.5 (latest: v0.52.6)
      Adding wyz v0.5.1 (latest: v0.6.1)
   Compiling swc v0.278.2
error[E0308]: mismatched types
   --> /home/pmcneil/.cargo/registry/src/index.crates.io-6f17d22bba15001f/swc-0.278.2/src/lib.rs:909:21
    |
909 |                     orig,
    |                     ^^^^ expected `sourcemap::SourceMap`, found `sourcemap::types::SourceMap`
    |
    = note: `sourcemap::types::SourceMap` and `sourcemap::SourceMap` have similar names, but are actually distinct types
note: `sourcemap::types::SourceMap` is defined in crate `sourcemap`
   --> /home/pmcneil/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sourcemap-9.0.0/src/types.rs:463:1
    |
463 | pub struct SourceMap {
    | ^^^^^^^^^^^^^^^^^^^^
note: `sourcemap::SourceMap` is defined in crate `sourcemap`
   --> /home/pmcneil/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sourcemap-8.0.1/src/types.rs:481:1
    |
481 | pub struct SourceMap {
    | ^^^^^^^^^^^^^^^^^^^^
    = note: perhaps two different versions of crate `sourcemap` are being used?

For more information about this error, try `rustc --explain E0308`.
error: could not compile `swc` (lib) due to 1 previous error
error: failed to compile `fsrt v0.1.0 (/home/pmcneil/devel/forge-apps/FSRT/crates/fsrt)`, intermediate artifacts can be found at `/home/pmcneil/devel/forge-apps/FSRT/target`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.
@pmcneil
Copy link
Author

pmcneil commented Aug 6, 2024

Running on Fedora 40 Linux, fresh install of Rust using curl installer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant