Skip to content
This repository has been archived by the owner on Jun 29, 2023. It is now read-only.

Installing from through cargo failing #80

Closed
aurabindo opened this issue Nov 25, 2022 · 2 comments
Closed

Installing from through cargo failing #80

aurabindo opened this issue Nov 25, 2022 · 2 comments

Comments

@aurabindo
Copy link

cargo install dioxus-cli results in the following build error:

error[E0061]: this function takes 2 arguments but 1 argument was supplied
   --> /home/aj/.cargo/registry/src/github.com-1ecc6299db9ec823/dioxus-cli-0.1.4/src/server/mod.rs:35:23
    |
35  |       let mut watcher = RecommendedWatcher::new(move |_: notify::Result<notify::Event>| {
    |  _______________________^^^^^^^^^^^^^^^^^^^^^^^-
36  | |         if chrono::Local::now().timestamp() > last_update_time
37  | |             && builder::build(&watcher_conf).is_ok()
38  | |         {
...   |
53  | |         }
54  | |     })
    | |______- an argument of type `notify::Config` is missing
    |
note: associated function defined here
   --> /home/aj/.cargo/registry/src/github.com-1ecc6299db9ec823/notify-5.0.0/src/lib.rs:294:8
    |
294 |     fn new<F: EventHandler>(event_handler: F, config: config::Config) -> Result<Self>
    |        ^^^
help: provide the argument
    |
35  ~     let mut watcher = RecommendedWatcher::new(move |_: notify::Result<notify::Event>| {
36  +         if chrono::Local::now().timestamp() > last_update_time
37  +             && builder::build(&watcher_conf).is_ok()
38  +         {
39  +             // change the websocket reload state to true;
40  +             // the page will auto-reload.
41  +             if watcher_conf
42  +                 .dioxus_config
43  +                 .web
44  +                 .watcher
45  +                 .reload_html
46  +                 .unwrap_or(false)
47  +             {
48  +                 let _ = Serve::regen_dev_page(&watcher_conf);
49  +             }
50  +             println!("watcher send reload");
51  +             reload_tx.send("reload".into()).unwrap();
52  +             last_update_time = chrono::Local::now().timestamp();
53  +         }
54  +     }, /* notify::Config */)
    |

For more information about this error, try `rustc --explain E0061`.
error: could not compile `dioxus-cli` due to previous error
warning: build failed, waiting for other jobs to finish...
error: failed to compile `dioxus-cli v0.1.4`, intermediate artifacts can be found at `/tmp/cargo-install1S8Vlh`
@ealmloff
Copy link
Member

ealmloff commented Nov 25, 2022

See #67 and #59. The cargo installation is broken. A dependency broke on a minor version. Until the next release is published the git master branch installation works.

@aurabindo
Copy link
Author

Ah, my bad. I didnt look for closed issues.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants