Hello,
I’m trying to write my first rescript file that uses a binding and it is failing.
This is my code, that works on the playground:
@module external commondir: array<string> => string = "commondir"
let res = commondir(["a"])
However, the compiler is erroring like this:
rescript: [1/3] src/determineDestinationPath.ast
FAILED: src/determineDestinationPath.ast
File "/Users/danielo/mega/programacion/node/js-file-mover/src/determineDestinationPath.re", line 1, characters 1-2:
Error: Syntax error
We've found a bug for you!
/Users/danielo/mega/programacion/node/js-file-mover/src/determineDestinationPath.re
There's been an error running Reason's parser on a file.
If the message doesn't help, check for errors slightly above.
Please file an issue on github.com/facebook/reason. Thanks!
FAILED: cannot make progress due to previous errors.
I can’t figure out how to follow. I just installed rescript like yarn add -D rescript
and call it like "re:build": "rescript",
just like the official page suggest.