digitallyinduced/thin-rescript-starter

Broken build

Opened this issue · 2 comments

Following the instructions, the project compiles but emits a warning about unused ThinBackend

➜  myproject git:(master) ✗ npm run rescript:build

> rescript-project-template@0.0.1 rescript:build
> rescript

Dependency on @rescript/react
rescript: [38/38] src/legacy/ReactDOMRe.cmj
rescript: [49/49] install.stamp
Dependency on rescript-ihp-backend
rescript: [3/3] ThinBackend.cmj
rescript: [5/5] install.stamp
Dependency Finished
rescript: [5/6] src/App.cmj

  Warning number 33
  /home/late/projects/ocaml/web/myproject/src/App.res:1:1-16

  1 │ open ThinBackend
  2 │
  3 │ @react.component

  unused open ThinBackend.

rescript: [6/6] src/Main.cmj

When trying to launch the development server, ThinBackend resolution fails

➜  myproject git:(master) ✗ npm run dev

> rescript-project-template@0.0.1 dev
> node server.js

 > src/Main.bs.js:6:28: error: Could not resolve "ihp-backend" (mark it as external to exclude it from the bundle)
    6 │ import * as IhpBackend from "ihp-backend";
      ╵                             ~~~~~~~~~~~~~

 > src/App.bs.js:4:25: error: Could not resolve "ihp-backend/react" (mark it as external to exclude it from the bundle)
    4 │ import * as React$1 from "ihp-backend/react";
      ╵                          ~~~~~~~~~~~~~~~~~~~

Development server running on http://localhost:3000

I guess ihp-backend is the old name of the dependency...

The ReScript integration didn’t get much love recently. So it’s best if you give it a try with TypeScript first. We’ll improve the ReScript integration soon-ish and get it working again in the future.

Any news on getting rescript support back again? Anything I can do to help?