Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken build #1

Open
laaksonel opened this issue Aug 9, 2022 · 2 comments
Open

Broken build #1

laaksonel opened this issue Aug 9, 2022 · 2 comments

Comments

@laaksonel
Copy link

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

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

> [email protected] 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

> [email protected] 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...

@mpscholten
Copy link
Member

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.

@mannebusk
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants