To fix the error you mentioned, you have to write Js_of_ocaml_lwt.Lwt_js_events instead of Lwt_js_events. I don’t know if you have already changed this but you also need to replace occurrences of Dom and Dom_html by Js_of_ocaml.Dom and Js_of_ocaml.Dom_html respectively.