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

The module or file ReasonReact can't be found. #15

Closed
martinos opened this issue Mar 22, 2018 · 6 comments
Closed

The module or file ReasonReact can't be found. #15

martinos opened this issue Mar 22, 2018 · 6 comments

Comments

@martinos
Copy link

After cloning this repo and
npm install && npm start

I got the following error message:

FAILED: src/TodoApp.cmj /Users/mchabot/dev/reason/a-reason-react-tutorial/lib/js/src/TodoApp.js src/TodoApp.cmi
/Users/coucou/dev/reason/a-reason-react-tutorial/node_modules/bs-platform/lib/bsc.exe -bs-package-name reason-to-do  -bs-package-output commonjs:lib/js/src -bs-assume-no-mli -bs-no-builtin-ppx-ml -bs-no-implicit-include -I /Users/coucou/dev/reason/a-reason-react-tutorial/node_modules/reason-react/lib/ocaml -I src  -w -30-40+6+7+27+32..39+44+45+101 -nostdlib -I '/Users/mchabot/dev/reason/a-reason-react-tutorial/node_modules/bs-platform/lib/ocaml' -no-alias-deps -color always -bs-re-out -bs-super-errors -o src/TodoApp.cmj -c  src/TodoApp.mlast

  We've found a bug for you!
  /Users/mchabot/dev/reason/a-reason-react-tutorial/src/TodoApp.re 1:17-46

  1 │ let component = ReasonReact.statelessComponent("TodoApp");
  2 │
  3 │ let make = (children) => {

  The module or file ReasonReact can't be found.
@guillaumebadin
Copy link

I Have the same problem

@jaredly
Copy link
Owner

jaredly commented Mar 22, 2018

Sorry about that! I just pushed a change to lock down the bs-platform dependency -- apparently there was a breaking change 😕or something. version 2.1.0 works

@jaredly jaredly closed this as completed Mar 22, 2018
@martinos
Copy link
Author

martinos commented Mar 22, 2018

Thanks it works,
But now when I run npm start and I autoformat the TodoApp.re file I get the following error in the terminal:

File "/Users/me/dev/reason/a-reason-react-tutorial/src/TodoApp.re", line 12, characters 1-2:
Error: 2538: <UNKNOWN SYNTAX ERROR>
File "/Users/me/dev/reason/a-reason-react-tutorial/src/TodoApp.re", line 1, characters 0-0:
Error: Error while running external preprocessor
Command line: /Users/me/dev/reason/a-reason-react-tutorial/node_modules/bs-platform/lib/refmt3.exe --print binary '/Users/mchabot/dev/reason/a-reason-react-tutorial/src/TodoApp.re' > /var/folders/3d/0bcszqq14k565g0sqxghlmcm0000gp/T/ocamlppe8d379

Is this related to the change that you just made?

I think this might be caused by the autoformater.

It seems that the formatted code does not compile:

let component = ReasonReact.statelessComponent("TodoApp");

let make = children => {
  ...component,
  render: self =>
    <div className="app">
      <div className="title">
        (ReasonReact.stringToElement("What to do"))
      </div>
      <div className="items"> (ReasonReact.stringToElement("Nothing")) </div>
    </div>,
};

I have made it compile by removing the , after the last </div>.

@chenglou
Copy link
Collaborator

Be on the latest version of bs-platform (2.2.3), ReasonReact (0.3.4) and reason-cli. Everything works after that.

@martinos
Copy link
Author

martinos commented Mar 23, 2018

I think that package.json should be updated to reflect this.

chenglou added a commit that referenced this issue Mar 23, 2018
Fixes #15 again
@chenglou
Copy link
Collaborator

Done

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

4 participants