Unimplemented Javascript primitive caml_pure_js_expr

I have a project in OCaml that could be compiled in Ubuntu long time ago. Today, I want to pick up the project and try to compile it in macOS Mojave 10.14.2.

ocaml --version returns The OCaml toplevel, version 4.07.1 , js_of_ocaml --version returns 3.3.0 , npm --version returns 6.7.0 , node --version returns v8.9.3 .

makefile works fine and generates analyze . But ./analyze test.ev returns Unimplemented Javascript primitive caml_pure_js_expr! .

Does anyone know where may be the problem?

1 Like

It looks like that you run the bytecode produced by ocamlc yourself? You need to compile the bytecode with js_of_ocaml first and uses node.js to run it