Bigstringaf not implemented

Hi,

I’m new to Ocaml.

I have school project where I need to create a game with ocsigen (eliom, etc..)

I’ve generated a project with eliom-distillery and I’m trying to execute some js throught js_of_ocaml, but it seems to crash before doing anything (I can’t log in the console)

The reason seems to be that bigstringaf not implemented.

Can someone explain how can I implement it? It seems to be installed. Maybe it doesn’t compile with it.

For the record, I’ve generated a basic.ppx template project.

How are you running the JavaScript? I would expect you to include it in a web page, in which case you can access the browser console.

How do you know the problem comes from bigstringaf? If it is an exception saying <function name> not implemented, you should have gotten warnings about this when you compiled the project. Was it the case?

Here is the project if you want to look at it : h42n42/h42n42 at main · vgauther/h42n42 · GitHub

For now, I’m trying to update the page and add multiple <div>

I’m using Html.Manip.appendChild ~%elt c.elt; where c.elt is a <div>. Also, I’m trying to log in the console at some point of the program but none of the print happends. For me, I’m using js_of_ocaml to run JS.

I have in fact Bigstringaf not implemented in the console. And it throw a warning when I compile the project, yes.

And it is very strange that even with the program not edited (basic.ppx template), I had this error (Bigstringaf not implemented)

It seems bigstringaf has support to compile to JavaScript, so something is likely off in the compilation instructions. Did you consider this advice ?

I’m not sure of what a dune-template is but I think my code should work as it is. It is very basic.

What commands do you use to compile ? And then to run?

I’m using make test.byte as the readme me told me so. It compiles and run the server locally.

Here is what I get when typing make test.byte in your repo:

eliomc -ppx -infer -package lwt_ppx -package js_of_ocaml-ppx_deriving_json h42n42.eliom
File "h42n42.eliom", line 23, characters 6-20:
23 |       Playground.elt;
           ^^^^^^^^^^^^^^
Error: Unbound module Playground

Also as pointed out with @dbuenzli you are using a deprecated Makefile and template. I don’t know how you used eliom-distillery but I would advise that you create a new, more up-to-date template (eliom-distillery -template app.exe -name <PROJECT NAME>) and copy your files there; otherwise you risk having some features that don’t work.

I’ve tried eliom-distillery -template app.exe -name <PROJECT NAME> but I got a Not a known template name: “app.exe“

I’m using eliom 10.2.0, only with this version I managed to make a server run. Maybe should I use an other version ?

This version is two years old. Yes, I expect it would work with the latest 11.1.1.