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

Tokio version appears to be mising new_multi_thread fresh install with LiveView 0.5.0-alpha.0 #2031

Closed
LiamKarlMitchell opened this issue Mar 9, 2024 · 1 comment
Labels
bug Something isn't working dependencies Pull requests that update a dependency file liveview Related to the liveview renderer

Comments

@LiamKarlMitchell
Copy link
Contributor

Feature Request

Attempting to follow along with guide for dioxus.
https://dioxuslabs.com/learn/0.5/getting_started/liveview

I get an error on first build it seems another dependency was needed for Tokio.

cargo build
   Compiling dioxus-liveview v0.5.0-alpha.0
error[E0599]: no function or associated item named `new_multi_thread` found for struct `tokio::runtime::Builder` in the current scope
   --> /home/liam/.cargo/registry/src/index.crates.io-6f17d22bba15001f/dioxus-liveview-0.5.0-alpha.0/src/launch.rs:12:30
    |
12  |     tokio::runtime::Builder::new_multi_thread()
    |                              ^^^^^^^^^^^^^^^^
    |                              |
    |                              function or associated item not found in `Builder`
    |                              help: there is an associated function with a similar name: `new_current_thread`
    |
note: if you're trying to build a new `tokio::runtime::Builder` consider using one of the following associated functions:
      tokio::runtime::Builder::new_current_thread
      tokio::runtime::Builder::new
   --> /home/liam/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/builder.rs:217:5
    |
217 |     pub fn new_current_thread() -> Builder {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
263 |     pub(crate) fn new(kind: Kind, event_interval: u32) -> Builder {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Implement Suggestion

[dependencies]
dioxus = { version = "0.5.0-alpha.0", features = ["liveview", "axum"] }
tokio = { version = "1.36.0", features = ["full"] }
@ealmloff ealmloff added bug Something isn't working dependencies Pull requests that update a dependency file liveview Related to the liveview renderer labels Mar 11, 2024
@ealmloff ealmloff added this to the 0.5.0: Signals milestone Mar 11, 2024
@jkelleyrtp jkelleyrtp assigned jkelleyrtp and unassigned jkelleyrtp Mar 11, 2024
@jkelleyrtp
Copy link
Member

Closed by #2073

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dependencies Pull requests that update a dependency file liveview Related to the liveview renderer
Projects
None yet
Development

No branches or pull requests

3 participants