I cannot use websocket

Yes, and it’s telling you to remove your #use and your #require

how am i suppose to import the websocket then ?

You don’t “import” them, you provide them on the command line, and then you can just use them without doing anything in particular. The #... of the toplevel are just here because you do not want to restart the toplevel everytime you need to add a pacakge

As I said earlier, by compiling with:

$ ocamlfind ocamlc -linkpkg -package websocket codes.ml

Or you can use a real build system like dune.

1 Like

Same question asked here Reddit - Dive into anything

Please link if asking in multiple forums.