Skip to content

Failed to run example #34

@oovm

Description

@oovm
error[E0599]: no method named `with_automatic_layout` found for struct `CodeEditorOptions` in the current scope
  --> yew\src\main.rs:16:10
   |
16 |         .with_automatic_layout(true)
   |          ^^^^^^^^^^^^^^^^^^^^^ method not found in `CodeEditorOptions`


error[E0277]: the trait bound `monaco::yew::CodeEditor: yew::Component` is not satisfied
  --> yew\src\main.rs:32:10
   |
32 |         <CodeEditor classes={"full-height"} options={ get_options().to_sys_options() } model={text_model.clone()} />
   |          ^^^^^^^^^^ the trait `yew::Component` is not implemented for `monaco::yew::CodeEditor`
   |
   = help: the trait `yew::Component` is implemented for `ContextProvider<T>`
   = note: required for `monaco::yew::CodeEditor` to implement `yew::BaseComponent`
   = note: this error originates in the macro `html` (in Nightly builds, run with -Z macro-backtrace for more info)


error[E0599]: the function or associated item `new` exists for struct `VChild<CodeEditor>`, but its trait bounds were not satisfied
  --> yew\src\main.rs:32:10
   |
32 |         <CodeEditor classes={"full-height"} options={ get_options().to_sys_options() } model={text_model.clone()} />
   |          ^^^^^^^^^^ function or associated item cannot be called on `VChild<CodeEditor>` due to unsatisfied trait bounds
   |
  ::: github.com-1ecc6299db9ec823\monaco-0.3.0\src\yew\mod.rs:28:1
   |
28 | pub struct CodeEditor {
   | --------------------- doesn't satisfy `monaco::yew::CodeEditor: yew::BaseComponent`
   |
   = note: the following trait bounds were not satisfied:
           `monaco::yew::CodeEditor: yew::BaseComponent`
   = note: this error originates in the macro `html` (in Nightly builds, run with -Z macro-backtrace for more info)

with

[dependencies]
wasm-bindgen = "0.2.84"
yew = { version = "0.20.0", features = ["csr"]  }
monaco = { version = "0.3.0", features = ["yew-components"] }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions