4 ms·
started from quickstart and now we're here: ``` let message = "hello"; print_endline message; /* Prints "hello" */ ``` output $ bsb -make-world -w >>>> S
by mlevental 9y ago
started from quickstart and now we're here:
```
let message = "hello";
print_endline message; /* Prints "hello" */
```
output
$ bsb -make-world -w
>>>> Start compiling
Rebuilding since just get started
ninja: Entering directory `lib/bs'
[1/2] Building src/demo.mlast
FAILED: src/demo.mlast
/usr/local/lib/node_modules/bs-platform/lib/bsc.exe -pp
"/usr/local/lib/node_modules/bs-platform/lib/refmt3.exe --print binary" -w -30-40+6+7+27+32..39+44+45+101 -bs-suffix -nostdlib -I '/Users/max/dev_projects/my-first-app/node_modules/bs-platform/lib/ocaml' -no-alias-deps -color always -c -o src/demo.mlast -bs-syntax-only -bs-binary-ast -impl /Users/max/dev_projects/my-first-app/src/demo.re
File "/Users/max/dev_projects/my-first-app/src/demo.re", line 2, characters 15-22:
Error: 2122: syntax error, consider adding a `;' before
File "/Users/max/dev_projects/my-first-app/src/demo.re", line 1, characters 0-0:
Error: Error while running external preprocessor
Command line: /usr/local/lib/node_modules/bs-platform/lib/refmt3.exe --print binary '/Users/max/dev_projects/my-first-app/src/demo.re' > /var/folders/7_/ycch7zrn72b3r_f7sw8lp4v80000gn/T/ocamlpp5f8d7e
---
this is straight from the docs. print_line(message) works fine.
- thangngoc89 9y ago`print_endline message` is version 2 syntax. Could you point me to the exact location so I can send a PR to fix it?
- mlevental 9y agolooks like you found it already. somewhere else it said also that compiled js is at lib/js. that's not true anymore (as i'm sure you know it's now at src/name.bs.js)
- yawaramin 9y agoCan you point to where you got that code from, a URL please. We will fix it so that others won't get errors. Thanks for your help.
- mlevental 9y agoprint_endline was here but someone already got it: https://reasonml.github.io/docs/en/let-binding.html https://reasonml.github.io/docs/en/let-binding.html lib/js was here https://reasonml.github.io/docs/en/quickstart-javascript.html https://reasonml.github.io/docs/en/quickstart-javascript.htm... but someone got that one too
- yawaramin 9y agoThanks! Appreciate the report :-)