Skip to content

Unable to install Compilation errors SourceMap #49

@pmcneil

Description

@pmcneil

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions