yewstack / yew

Rust / Wasm framework for creating reliable and efficient web applications
https://yew.rs
Apache License 2.0
30.5k stars 1.42k forks source link

Version 0.21.0 cannot be compiled #3706

Closed AI1186780944 closed 1 month ago

AI1186780944 commented 1 month ago

Problem When I tried to reference version 0.21.0 of Yew in a new project, the compilation failed. The error is shown in the following figure

Steps To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots image

Environment:

Questionnaire

ranile commented 1 month ago

Please provide reproduction steps

AI1186780944 commented 1 month ago

Please provide reproduction steps

1、Create a new project using the command 'cargo new yew-app'; 2、Open the project using RustRover IDEA; 3、In the Cargo.toml file located in the root directory of the project, directly reference yew={version="0.21.0", features=["csr"]} or yew={git=“ https://github.com/yewstack/yew/ Features=["csr"]} or yew="0.21.0". Then directly click on the Cargo Manager on the right to refresh and compile. Finally, a compilation error message will appear as shown in the screenshot.

And I tried to target the compilation to wasm32-unknown-unknown, but still encountered this problem.

WorldSEnder commented 1 month ago

If a manual cargo check on the console works, then I think that this is more related to RustRover IDEA or rust-analyzer getting run. In any case, this seems unrelated to yew, since already a dependency (web-sys) fails to build due to rust not finding the transitive dependencies for wasm-bindgen/js-sys. It's more likely specific to your setup.

Similar error on an open bug report for RustRover.

AI1186780944 commented 1 month ago

If a manual cargo check on the console works, then I think that this is more related to RustRover IDEA or rust-analyzer getting run. In any case, this seems unrelated to yew, since already a dependency (web-sys) fails to build due to rust not finding the transitive dependencies for wasm-bindgen/js-sys. It's more likely specific to your setup.

Similar error on an open bug report for RustRover.

emmmm……After running the cargo check command, the compilation passed. This problem seems to have been resolved. Thank you very much for your suggestion. I will continue to try again.