chenglou / intro-to-reason-compilation

Ready up!
270 stars 19 forks source link

Can't run step7 #5

Closed yhsiang closed 7 years ago

yhsiang commented 7 years ago

Hi, everything is fine when running step1-6, but step7 got errors. Environment:

MacOS 10.12.2
The OCaml compiler, version 4.02.3
node v6.3.1
npm 3.10.3

Error messages:

File "node_modules/reason-js/src/ReasonJs.re", line 15, characters 7-13:
Error: 438: <SYNTAX ERROR>

File "node_modules/reason-js/src/ReasonJs.re", line 1:
Error: Error while running external preprocessor
Command line: refmt 'node_modules/reason-js/src/ReasonJs.re' > /var/folders/qt/qx5f0wb14b923zrz5m2b7jj00000gn/T/ocamlpp4549dd

File "src/test.re", line 16, characters 0-19:
Error: Unbound module ReasonJs
module.js:442
    throw err;
    ^

Error: Cannot find module '/Users/yhsiang/w/appier/intro-to-reason-compilation/step7/_build/self/test.js'
    at Function.Module._resolveFilename (module.js:440:15)
    at Function.Module._load (module.js:388:25)
    at Module.runMain (module.js:575:10)
    at run (bootstrap_node.js:352:7)
    at startup (bootstrap_node.js:144:9)
    at bootstrap_node.js:467:3

Check reasonJs.re Line 15: module Window, did I miss something to upgrade or ?

chenglou commented 7 years ago

Hey @yhsiang, thanks for the notice! Which version of refmt are you using? I've made an update that should theoretically fix your thing. Tell me if it did!

yhsiang commented 7 years ago

Hi @chenglou , My original refmt is 1.3.0, now I use 1.7.3 and fixed by this commit b7a2c4b920378abbf197060e47f8b34b23e220f9

Thanks!