Im facing this error when i try to compile the node editor to web:
error[E0061]: this function takes 3 arguments but 2 arguments were supplied
--> egui_node_graph_example\src\lib.rs:22:5
22
eframe::start_web(canvas_id, Box::new(app))
^^^^^^^^^^^^^^^^^-------------------------- an argument of type Box<(dyn for<'r, 's> FnOnce(&'r CreationContext<'s>) -> Box<(dyn App + 'static)> + 'static)> is missing
note: expected struct WebOptions, found struct Box
--> egui_node_graph_example\src\lib.rs:22:34
22
eframe::start_web(canvas_id, Box::new(app))
^^^^^^^^^^^^^
= note: expected struct WebOptions
found struct Box<NodeGraphExample>
note: function defined here
--> C:\Users\2021.cargo\registry\src\github.com-1ecc6299db9ec823\eframe-0.19.0\src\lib.rs:112:8
----------------------------------------- expected Result<(), JsValue> because of return type
21
let app = NodeGraphExample::default();
22
eframe::start_web(canvas_id, Box::new(app))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected (), found struct Arc
= note: expected enum Result<(), _>
found enum Result<Arc<eframe::egui::mutex::Mutex<AppRunner>>, _>
Some errors have detailed explanations: E0061, E0308.
For more information about an error, try rustc --explain E0061.
error: could not compile egui_node_graph_example due to 2 previous errors
Box<(dyn for<'r, 's> FnOnce(&'r CreationContext<'s>) -> Box<(dyn App + 'static)> + 'static)>
is missingWebOptions
, found structBox
--> egui_node_graph_example\src\lib.rs:22:34WebOptions
found structBox<NodeGraphExample>
note: function defined here --> C:\Users\2021.cargo\registry\src\github.com-1ecc6299db9ec823\eframe-0.19.0\src\lib.rs:112:8help: provide the argument | 22 | eframe::start_web(canvas_id, / WebOptions /, / Box<(dyn for<'r, 's> FnOnce(&'r CreationContext<'s>) -> Box<(dyn App + 'static)> + 'static)> /) |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Result<(), JsValue>
because of return type 21()
, found structArc
= note: expected enum
Result<(), _>
found enumResult<Arc<eframe::egui::mutex::Mutex<AppRunner>>, _>
Some errors have detailed explanations: E0061, E0308. For more information about an error, try
rustc --explain E0061
. error: could not compileegui_node_graph_example
due to 2 previous errors