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

CLI install on MacOS with Apple Silicon #9018

Closed
OskarLebuda opened this issue Jun 3, 2024 · 8 comments
Closed

CLI install on MacOS with Apple Silicon #9018

OskarLebuda opened this issue Jun 3, 2024 · 8 comments
Assignees
Labels
Milestone

Comments

@OskarLebuda
Copy link

OskarLebuda commented Jun 3, 2024

Describe the bug

Hello,
While installing the cli using https://swc.rs/docs/plugin/ecmascript/getting-started got an error:

error[E0599]: no method named `atom` found for reference `&swc_ecma_ast::ModuleExportName` in the current scope
   --> /Users/USER_NAME/.cargo/registry/src/index.crates.io-6f17d22bba15001f/swc_ecma_ext_transforms-0.114.2/src/jest.rs:110:68
    |
110 | ...                   if HOIST_METHODS.contains(exported.atom()) {
    |                                                          ^^^^ method not found in `&ModuleExportName`

For more information about this error, try `rustc --explain E0599`.
error: could not compile `swc_ecma_ext_transforms` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
error: failed to compile `swc_cli v0.91.267`, intermediate artifacts can be found at `/var/folders/h5/2jkfqhw915ggtj52qf5l3n9w0m_69t/T/cargo-installHZTIM9`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.

Versions:

rustc

$ rustc --version
rustc 1.78.0 (9b00956e5 2024-04-29)

rustup

$ rustup --version
rustup 1.27.1 (54dd3d00f 2024-04-24)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.78.0 (9b00956e5 2024-04-29)`

cargo

$ cargo --version
cargo 1.78.0 (54d8815d0 2024-03-26)

System profile:

Software:
      System Version: macOS 14.5 (23F79)
      Kernel Version: Darwin 23.5.0

Hardware:
      Model Name: MacBook Pro
      Chip: Apple M2 Pro
      Total Number of Cores: 10 (6 performance and 4 efficiency)
      Memory: 32 GB
      System Firmware Version: 10151.121.1

Input code

No response

Config

No response

Playground link (or link to the minimal reproduction)

https://play.swc.rs/?version=1.5.24&code=H4sIAAAAAAAAA1WNMQ7CMAxFd5%2FCY3OFdqlgYmPgAk7qSiATR7ErFVW9eyMEQvzxf73%2Fxkt%2BcHKKwl0AXotWxyRkhjc2P%2BuzaObsyKtzngxPZPxrNwBsGa9VS7fhxDMt4j3OJMa4h%2Fdalij3hN7%2BeoyqwpQHgB2%2Bvg%2FWqORaX92fOQxwAFAhVQmlAAAA&config=H4sIAAAAAAAAA2WPSw7CMAxE9z1F5TULYIEEd%2BAQUepWQc1HtisRVb17kzYNIHbxvHjGMzdtCy%2FW8Gjn9ExDUMRIdU4KRyfqnRSQGJA1mSBwOqhwRr0aGavWofakxBMnJDThBpadgygaULIf8vV8uRcvGL1n%2FPUCa5zp4%2Fc12ttAyPwXapUbxrq%2FJzYlFazvpg2WlrnJfsENPp%2BOsGoMhp%2FH5tZjWQEa0ouIMQEAAA%3D%3D

SWC Info output

No response

Expected behavior

fix the code

Actual behavior

No response

Version

newest

Additional context

No response

@kdy1 kdy1 self-assigned this Jun 4, 2024
@kdy1 kdy1 added this to the Planned milestone Jun 4, 2024
@kdy1
Copy link
Member

kdy1 commented Jun 4, 2024

Should be fixed by 2fb890c

@kdy1 kdy1 closed this as completed Jun 4, 2024
@OskarLebuda
Copy link
Author

OskarLebuda commented Jun 4, 2024

Should be fixed by 2fb890c

@kdy1
What you mean "should". I'm new in the "rust world". This requires some kind of release or something?
Still cannot install cli - same error

@OskarLebuda
Copy link
Author

After cleaning some caches got another error

35.46 error[E0599]: no method named `is_reserved_in_any` found for struct `swc_ecma_ast::Ident` in the current scope
35.46    --> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/swc_ecma_compat_es2022-0.5.2/src/class_properties/private_field.rs:592:21
35.46     |
35.46 592 |             if n.id.is_reserved_in_any() {
35.46     |                     ^^^^^^^^^^^^^^^^^^
35.46     |
35.46 help: there is a method `is_reserved` with a similar name
35.46     |
35.46 592 |             if n.id.is_reserved() {
35.46     |                     ~~~~~~~~~~~
35.46 
35.71 error[E0599]: no method named `is_reserved_in_any` found for struct `swc_ecma_ast::Ident` in the current scope
35.71    --> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/swc_ecma_compat_es2022-0.5.2/src/class_properties/mod.rs:806:50
35.71     |
35.71 806 | ...                   if method.key.id.is_reserved_in_any() {
35.71     |                                        ^^^^^^^^^^^^^^^^^^
35.71     |
35.71 help: there is a method `is_reserved` with a similar name
35.71     |
35.71 806 |                                 if method.key.id.is_reserved() {
35.71     |                                                  ~~~~~~~~~~~
35.71 
35.72    Compiling swc_ecma_transforms_optimization v0.199.2
35.86 For more information about this error, try `rustc --explain E0599`.
35.86 error: could not compile `swc_ecma_compat_es2022` (lib) due to 2 previous errors
35.87 warning: build failed, waiting for other jobs to finish...
59.85 error: failed to compile `swc_cli v0.91.269`, intermediate artifacts can be found at `/tmp/cargo-installEbFi2I`.
59.85 To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.

@kdy1 kdy1 modified the milestones: Planned, v1.5.25 Jun 5, 2024
@LukasGerm
Copy link

I can also reproduce this exact error on windows. What shall we do to go past this error?

@kdy1 kdy1 modified the milestones: v1.5.25, Planned Jun 7, 2024
@kdy1 kdy1 reopened this Jun 7, 2024
@kdy1
Copy link
Member

kdy1 commented Jun 7, 2024

Fixed
image

@kdy1 kdy1 closed this as completed Jun 7, 2024
@LukasGerm
Copy link

Do we need to use a newer version of swc_cli then? Or how does it work now? Because I can still reproduce? @kdy1

@LukasGerm
Copy link

Can confirm it works now with the new version.

@kdy1 kdy1 modified the milestones: Planned, v1.5.26 Jun 10, 2024
@swc-bot
Copy link
Collaborator

swc-bot commented Jul 10, 2024

This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@swc-project swc-project locked as resolved and limited conversation to collaborators Jul 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests

4 participants