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

[Apple M1] error from HTML pipeline during tutorial #2680

Closed
shoothzj opened this issue May 14, 2022 · 8 comments
Closed

[Apple M1] error from HTML pipeline during tutorial #2680

shoothzj opened this issue May 14, 2022 · 8 comments

Comments

@shoothzj
Copy link

shoothzj commented May 14, 2022

Got error from HTML pipeline during tutorial when following https://github.com/yewstack/yew/blob/master/website/docs/tutorial/index.mdx

┌─[MacBook-Pro] - [~/code/rust/rust-examples/yew-example] - [Sat May 14, 09:27]
└─[$] <git:(main*)> trunk serve --open
2022-05-14T01:27:07.814066Z  INFO 📦 starting build
2022-05-14T01:27:07.814390Z  INFO spawning asset pipelines
2022-05-14T01:27:07.898393Z  INFO building yew-example
    Finished dev [unoptimized + debuginfo] target(s) in 0.02s
2022-05-14T01:27:07.974863Z  INFO fetching cargo artifacts
2022-05-14T01:27:08.050638Z  INFO processing WASM for yew-example
2022-05-14T01:27:08.055948Z  INFO downloading wasm-bindgen version="0.2.80"
2022-05-14T01:27:08.056312Z ERROR ❌ error
error from HTML pipeline

Caused by:
    0: error from asset pipeline
    1: failed downloading release archive
    2: unsupported architecture
2022-05-14T01:27:08.056477Z  INFO 📡 serving static assets at -> /
2022-05-14T01:27:08.056548Z  INFO 📡 server listening at http://127.0.0.1:8080
^C

env

  • Apple M1 mac
@shoothzj shoothzj added the bug label May 14, 2022
@futursolo
Copy link
Member

If you are using an Apple Silicon Mac, you need to install the tools manually.

brew install binaryen sass
cargo install wasm-bindgen-cli

@futursolo futursolo removed the bug label May 14, 2022
@futursolo
Copy link
Member

This is an issue with trunk.

If you face any other issues regarding using the trunk command, please file it with trunk.

@shoothzj shoothzj changed the title [master] error from HTML pipeline during tutorial [Apple M1] error from HTML pipeline during tutorial May 14, 2022
@shoothzj
Copy link
Author

@futursolo Thank you.

@Chralt98
Copy link

Chralt98 commented Oct 2, 2022

I can't find sass in brew. Is it node-sass or sass/sass/sass?

@Chralt98
Copy link

Chralt98 commented Oct 2, 2022

I get the error still with the M1 chip. Although of your suggestions.

ERROR ❌ error
error from HTML pipeline

Caused by:
    0: error getting cargo metadata
    1: `cargo metadata` exited with an error: error: failed to parse manifest at `/Users/test/Cargo.toml`
       
       Caused by:
         no targets specified in the manifest
         either src/lib.rs, src/main.rs, a [lib] section, or [[bin]] section must be present

@futursolo
Copy link
Member

I can't find sass in brew. Is it node-sass or sass/sass/sass?

The one I installed is sass/sass/sass. However, the latest trunk can already download tools if you have Rosetta enabled on your Apple Silicon Mac. These instructions are no longer needed.

I get the error still with the M1 chip. Although of your suggestions.

ERROR ❌ error
error from HTML pipeline

Caused by:
    0: error getting cargo metadata
    1: `cargo metadata` exited with an error: error: failed to parse manifest at `/Users/test/Cargo.toml`
       
       Caused by:
         no targets specified in the manifest
         either src/lib.rs, src/main.rs, a [lib] section, or [[bin]] section must be present

Could you please try to run cargo clippy under the same directory you have run trunk?
I think this error is due to the crate is not configured correctly.
trunk expects a binary crate and cargo would detect this by checking whether a src/main.rs presents.

@Chralt98
Copy link

Chralt98 commented Oct 2, 2022

You are right. Cargo clippy doesn't work, because of the underlying problem.

error: failed to parse manifest at `/Users/test/Cargo.toml`

Caused by:
  no targets specified in the manifest
  either src/lib.rs, src/main.rs, a [lib] section, or [[bin]] section must be present

But I am running the commands inside the minimal trunk example repository. How can I configure it correctly then?

@Chralt98
Copy link

Chralt98 commented Oct 2, 2022

This solved my issue. I got a Cargo.toml file in the parent root, that I didn't really use. It works now!

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

3 participants