Giter Site home page Giter Site logo

reason-cli's People

Contributors

andreypopp avatar bsansouci avatar chenglou avatar cristianoc avatar helveticascenario avatar hugo avatar insidersbyte avatar jordwalke avatar kennetpostigo avatar meafmira avatar mikeball avatar naartjie avatar olleolleolle avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

reason-cli's Issues

Refmt with deriving abstract

Hi!

Is there any reason to have this formatting:

[@bs.deriving abstract]
type props = {
  [@bs.optional]
  title: string,
  [@bs.optional]
  active: bool,
  [@bs.optional]
  className: string,
};

over

type props = {
  [@bs.optional] title: string,
  [@bs.optional] active: bool,
  [@bs.optional] className: string,
};

?

I think the current version is affecting readability negatively.

reason-cli npm installation breaks npm outdated

Repro:

  1. npm install -g <URL-to-reason-cli-binary-release-archive>
  2. Run npm outdated -g

Expected: the second command works as intended
Instead: it fails with following output

> npm ou -g
npm ERR! code E404
npm ERR! 404 Registry returned 404 for GET on https://registry.npmjs.org/reason-cli
npm ERR! 404 
npm ERR! 404  'reason-cli' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404 
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/develop7/.npm/_logs/2017-10-29T08_35_18_470Z-debug.log

refmt should move ternary operators onto the next line as the first non-whitespace char

Would anybody else feel like it would be better if ternary operators went as the first character on a new line instead of the last character on the current line?

Currently refmt does this:

someCondition ?
  doTheThing() :
  doTheOtherThing()

I think it would be more readable if it was formatted like this:

someCondition
  ? doTheThing()
  : doTheOtherThing()

When you have a big block of react components that are conditionally displayed on a boolean, your code gets auto formatted to use a ternary operator and it's really hard to see where the ? and : start/stop.

As a possible added benefit, I think this is how eslint and prettier formats ternary statements so people coming over from JS land might find this more familiar.

Repo size

I wanted to clone this repo to tweak linux version a little but I found out it's 2GB in size. Is it possible to shrink it somehow?

Binaries including refmt and ocamlmerlin are not being built

npm install -g git://github.com/reasonml/reason-cli.git fails to build all the necessary binaries.
Following files are missing from /usr/local/lib/node_modules/reason-cli/.bin: ocamlmerlin ocamlmerlin-reason reactjs_jsx_ppx refmt refmt_merlin refmttype.

The regression was introduced sometime after 1c96f53 (was tested with 66b655a). This log snippet might be relevant: make: *** No rule to make target berror.build', needed by reason-cli-actual.build'. Stop.

Here's the log for the npm install in question: https://gist.github.com/jasim/6d29ced244b91146c7af064f77c3436b.

The problem doesn't exist with previous versions. Here's the log for 1c96f53, which builds everything correctly. https://gist.github.com/jasim/2e3c3382ff001d6921d8762037889a26

@glennsl

yarn global add doesn't work

I think yarn just doesn't like this particular form of dependency specification:

[~/development]$ yarn global add git://github.com/reasonml/reason-cli.git                                                                                                                                                         *[master] 
yarn global v0.20.3
[1/4] Resolving packages...
error Couldn't find manifest in "git://github.com/reasonml/esy.git".

we might just need to write the git URL slightly differently.

Failed to install on OSX

Hi, I'm running into this on an install and I'm stuck. Could you please take a look? Thanks.

29979 silly vacuum-fs quitting because other entries in /Users/george/.nvm/versions/node/v7.9.0/lib/node_modules
29980 silly rollbackFailedOptional Finishing
29981 silly runTopLevelLifecycles Finishing
29982 silly install printInstalled
29983 verbose stack Error: [email protected] postinstall: `./performActualInstallAndFixLinks.sh`
29983 verbose stack Exit status 1
29983 verbose stack     at EventEmitter.<anonymous> (/Users/george/.nvm/versions/node/v7.9.0/lib/node_modules/npm/lib/utils/lifecycle.js:279:16)
29983 verbose stack     at emitTwo (events.js:106:13)
29983 verbose stack     at EventEmitter.emit (events.js:194:7)
29983 verbose stack     at ChildProcess.<anonymous> (/Users/george/.nvm/versions/node/v7.9.0/lib/node_modules/npm/lib/utils/spawn.js:40:14)
29983 verbose stack     at emitTwo (events.js:106:13)
29983 verbose stack     at ChildProcess.emit (events.js:194:7)
29983 verbose stack     at maybeClose (internal/child_process.js:899:16)
29983 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
29984 verbose pkgid [email protected]
29985 verbose cwd /Users/george/projects/pg
29986 error Darwin 16.5.0
29987 error argv "/Users/george/.nvm/versions/node/v7.9.0/bin/node" "/Users/george/.nvm/versions/node/v7.9.0/bin/npm" "install" "--verbose" "-g" "git://github.com/reasonml/reason-cli.git#beta-v-1.13.3"
29988 error node v7.9.0
29989 error npm  v4.2.0
29990 error code ELIFECYCLE
29991 error errno 1
29992 error [email protected] postinstall: `./performActualInstallAndFixLinks.sh`
29992 error Exit status 1
29993 error Failed at the [email protected] postinstall script './performActualInstallAndFixLinks.sh'.
29993 error Make sure you have the latest version of node.js and npm installed.
29993 error If you do, this is most likely a problem with the reason-cli package,
29993 error not with npm itself.
29993 error Tell the author that this fails on your system:
29993 error     ./performActualInstallAndFixLinks.sh
29993 error You can get information on how to open an issue for this project with:
29993 error     npm bugs reason-cli
29993 error Or if that isn't available, you can get their info via:
29993 error     npm owner ls reason-cli
29993 error There is likely additional logging output above.
29994 verbose exit [ 1, true ]

Homebrew's OCaml symlink overwritten after installing

Executing npm install -g git://github.com/reasonml/reason-cli.git#beta-v-1.13.5 overwrote homebrew's OCaml symlink.

Before executing the installation, ocaml -version was 4.04.1 and afterwards it was 4.02.3.

I had to re-link the package in brew with:

brew unlink ocaml && brew link ocaml
brew link --overwrite ocaml

Note: I am new to OCaml.

Compiler should warn when using a keyword as a variable name

It is very easy (for someone new to Reason) to use a reserved language keyword as a variable name and not know it. When this happens, the compiler might happily compile without warning and lead to strange results. Also, other interfaces (such as react props) may be designed with a prop name that is the same as a language keyword and it is difficult to debug this.

It would be nice if there was a compiler warning when using keywords as variable names or at least some documentation with all the reserved keywords and best practices for how to convert these to safer names from something like React props.

Ex:

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

let make = (
  ~className: option(string),
  ~match: option(string),
  ~onEditMatch: (. string, string) => unit
) => {
  ...component,
  render: _self => {

    /* Some will never happen... */
    switch (match) {
      | Some(_) => Js.log("Nope!")
      | None => Js.log("Every time")
    };

    <div> /* other content */ </div>
  }
};

let jsComponent =
  ReasonReact.wrapReasonForJs(
    ~component,
    (jsProps) => {
      make(
        ~className=Js.Nullable.toOption(jsProps##className),
        ~match=Js.Nullable.toOption(jsProps##match),
        ~onEditMatch=jsProps##onEditMatch
      )
    }
  );

because match is an OCaml keyword, it doesn't produce an optional value here as expected but there are no compiler warnings about it. Changing match to another name, this code works just fine.

rtop only understands old function syntax

Not sure if this is the right place for this, or if this is a known issue:

Reason # let foo = fun(x) => x + 2;
let foo : int => int = <fun>                                                    
Reason # let foo = (x) => x + 2;
Error: Syntax error 
 $ rtop -version
The universal toplevel for OCaml, version 1.19.3, compiled for OCaml version 4.02.3

I know that "Try ReasonML" is preferred as a sandbox/repl solution, but I find rtop useful when explaining types to people.

installing reason-cli 3.0.5 fails on Linux with "cross-device link not permitted"

Installing from the 3.0.5 tarball fails with:

EXDEV: cross-device link not permitted, rename '/tmp/releaseySS3yf/opam__slash__base_bytes-0.0.0-base-3e6fd7e7' -> '/home/zach/.node/lib/node_modules/reason-cli/3________________________________________/i/opam__slash__base_bytes-0.0.0-base-3e6fd7e7'
Error: EXDEV: cross-device link not permitted, rename '/tmp/releaseySS3yf/opam__slash__base_bytes-0.0.0-base-3e6fd7e7' -> '/home/zach/.node/lib/node_modules/reason-cli/3________________________________________/i/opam__slash__base_bytes-0.0.0-base-3e6fd7e7'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `node ./bin/esy.js install-release`
npm ERR! Exit status 1

System information:

zach@znbk:~$ uname -a
Linux znbk.ploskey.com 4.15.3-300.fc27.x86_64 #1 SMP Tue Feb 13 17:02:01 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
zach@znbk:~$ npm version
{ npm: '5.6.0',
  ares: '1.10.1-DEV',
  cldr: '31.0.1',
  http_parser: '2.7.0',
  icu: '59.1',
  modules: '57',
  nghttp2: '1.25.0',
  node: '8.9.4',
  openssl: '1.0.2n',
  tz: '2017b',
  unicode: '9.0',
  uv: '1.15.0',
  v8: '6.1.534.50',
  zlib: '1.2.11' }

install fails on CentOS 7 with missing GLIBCXX_3.4.21

..../node_modules/reason-cli/r/_esyEjectRoot/bin/fastreplacestring.exe: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by ..../node_modules/reason-cli/r/_esyEjectRoot/bin/fastreplacestring.exe)

CentOS 7 provides

strings /usr/lib64/libstdc++.so.6.0.19  | grep GLIBC
GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.3
GLIBCXX_3.4.4
GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.7
GLIBCXX_3.4.8
GLIBCXX_3.4.9
GLIBCXX_3.4.10
GLIBCXX_3.4.11
GLIBCXX_3.4.12
GLIBCXX_3.4.13
GLIBCXX_3.4.14
GLIBCXX_3.4.15
GLIBCXX_3.4.16
GLIBCXX_3.4.17
GLIBCXX_3.4.18
GLIBCXX_3.4.19
GLIBC_2.3
GLIBC_2.2.5
GLIBC_2.14
GLIBC_2.4
GLIBC_2.3.2
GLIBCXX_DEBUG_MESSAGE_LENGTH

Does it mean there is no way to use reason-cli on this system?

refmt shows incorrect version

No matter what version of reason-cli you're on refmt --version stuck on Reason 3.0.0 @ bee43b0. Tested on 3.0.5 and 3.1.0.

ocamlmerlin: segmentation fault @ macOS using reason-cli 3.1.0

I have a relatively fresh macOS installation (High SIerra, 10.13.3) with reason-cli 3.1.0, for me ocamlmerlin fails with a segfault:

$ uname -a
Darwin Nikitas-MacBook-Pro.local 17.4.0 Darwin Kernel Version 17.4.0: Sun Dec 17 09:19:54 PST 2017; root:xnu-4570.41.2~1/RELEASE_X86_64 x86_64
$ ocamlmerlin -version
The Merlin toolkit version next, for Ocaml 4.02.3
$ echo "" | ocamlmerlin single errors
Segmentation fault: 11

Using server mode

echo "" | ocamlmerlin server errors
{"class": "failure", "value": "abnormal termination", "notifications": [] }
abnormal termination
merlin path: /usr/local/lib/node_modules/reason-cli/3______________________________________________/i/esy_ocaml__slash__merlin-3.0.5003-4cb5d7b5/bin/ocamlmerlin-server
socket path: /var/folders/m4/xvrl14nd5tl9_swbmx99tp1h0000gn/T//ocamlmerlin_501_16777221_5186438.socket

Basically, I can't get it working so I had to roll back to reason-cli 3.0.5 which uses merlin 2.5.4 compared to 3.1.0 relying on 3.0.5 (0ed26dd, https://www.npmjs.com/package/@esy-ocaml/merlin).

ocamlmerlin binary broken in 3.3.3-macos?

Hi,

I just installed npm -g install [email protected], but now my VSCode plugin is not working anymore. Digging in a little it seems that ocamlmerlin is broken:

❯ /Users/Pascal/.asdf/installs/nodejs/8.9.1/.npm/lib/node_modules/reason-cli/bin/ocamlmerlin -h
execvp(ocamlmerlin-server): No such file or directory
merlin path: /Users/Pascal/.asdf/installs/nodejs/8.9.1/.npm/lib/node_modules/reason-cli/bin/ocamlmerlin-server
socket path: /var/folders/yq/ggpg7lnd6nndbnhr5xxyqhg80000gn/T//<not computed yet>

This error is also exposed in VSCode, see reasonml-editor/vscode-reasonml#243.

On the previous version (3.3.2-macos-betabeta) the VSCode plugin is working and the binary seems to work:

❯ /Users/Pascal/.asdf/installs/nodejs/8.9.1/.npm/lib/node_modules/reason-cli/bin/ocamlmerlin -h
Usage: ocamlmerlin-server <frontend> <arguments...>
Select the merlin frontend to execute. Valid values are:

- 'old-protocol' executes the merlin frontend from previous version.
  It is a top level reading and writing commands in a JSON form.

- 'single' is a simpler frontend that reads input from stdin,
  processes a single query and outputs result on stdout.

- 'server' works like 'single', but uses a background process to
  speedup processing.
If no frontend is specified, it defaults to 'old-protocol' for
compatibility with existing editors.

Failed to work with atom-ocaml-merlin or nuclide

I followed the guide in JavaScript Quickstart, but I just cannot make atom-OCaml-merlin or nuclide working. But VSCode-Reasoml works well,

In nuclide or atom-ocaml-merlin, I got an error in console:

[2017-07-16T03:24:48.601Z] [ERROR] nuclide-ocaml-rpc - Ocamlmerlin raised an error: ["error",{"type":"type","sub":[],"valid":true,"message":"Error: Error while running external preprocessor\nCommand line: node_modules/bs-platform/bin/bsppx.exe '/var/folders/vs/zmlqkcln7rx46sb2ygjvl7h40000gn/T/camlppxc9c14f' '/var/folders/vs/zmlqkcln7rx46sb2ygjvl7h40000gn/T/camlppxb89383' 1>/dev/null 2>/dev/null"}]
  command: {"query":["tell","start","end","Js.log \"Hello, BuckleScript and Reason!\";"],"context":["auto","/Users/z/Projects/ReasonML/my-first-app/src/demo.re"]}

And running the command manually:

$ node_modules/bs-platform/bin/bsppx.exe '/var/folders/vs/zmlqkcln7rx46sb2ygjvl7h40000gn/T/camlppxc9c14f' '/var/fol
ders/vs/zmlqkcln7rx46sb2ygjvl7h40000gn/T/camlppxb89383'
File "_none_", line 1:
Error: I/O error: /var/folders/vs/zmlqkcln7rx46sb2ygjvl7h40000gn/T/camlppxc9c14f: No such file or directory

$ cat /var/folders/vs/zmlqkcln7rx46sb2ygjvl7h40000gn/T/camlppx.lastfail
Caml1999M016����&_none_����
                           ��������1ocaml.ppx.context��&_none_A@�A����������)tool_name���&merlin@@����,include_dirs
@:@�����?�������ad_path!1/usr/local/lib/node_modules/bs-platform/lib/ocaml@G@�����'L��������3���2/Users/z/Projects/
ReasonML/my-first-app/lib/bs/src@T@�����>Y@Y@@Y@Y@@Y@Y@@Y@Y@@Y@Y@����,open_modules^����Gb@b@����+for_packageg����$N
onel@l@����%debugq����%falsev@v@����'cookies{����d�@�@@@�@@�@�@%

I also tried the guide in bucklescript but had no luck.

`npm i -g reason-cli` install macOS version on linux

Running

npm i -g reason-cli

on Debian outputs

$ npm i -g reason-cli
/home/virzen/.nvm/versions/node/v10.9.0/bin/ocamlmerlin-server -> /home/virzen/.nvm/versions/node/v10.9.0/lib/node_modules/reason-cli/bin/ocamlmerlin-server
/home/virzen/.nvm/versions/node/v10.9.0/bin/ocamlmerlin -> /home/virzen/.nvm/versions/node/v10.9.0/lib/node_modules/reason-cli/bin/ocamlmerlin
/home/virzen/.nvm/versions/node/v10.9.0/bin/ocamlmerlin-reason -> /home/virzen/.nvm/versions/node/v10.9.0/lib/node_modules/reason-cli/bin/ocamlmerlin-reason
/home/virzen/.nvm/versions/node/v10.9.0/bin/refmt -> /home/virzen/.nvm/versions/node/v10.9.0/lib/node_modules/reason-cli/bin/refmt
/home/virzen/.nvm/versions/node/v10.9.0/bin/rtop -> /home/virzen/.nvm/versions/node/v10.9.0/lib/node_modules/reason-cli/bin/rtop
/home/virzen/.nvm/versions/node/v10.9.0/bin/utop -> /home/virzen/.nvm/versions/node/v10.9.0/lib/node_modules/reason-cli/bin/utop
/home/virzen/.nvm/versions/node/v10.9.0/bin/refmttype -> /home/virzen/.nvm/versions/node/v10.9.0/lib/node_modules/reason-cli/bin/refmttype
/home/virzen/.nvm/versions/node/v10.9.0/bin/reactjs_jsx_ppx_v2 -> /home/virzen/.nvm/versions/node/v10.9.0/lib/node_modules/reason-cli/bin/reactjs_jsx_ppx_v2

> [email protected] postinstall /home/virzen/.nvm/versions/node/v10.9.0/lib/node_modules/reason-cli
> node ./esyInstallRelease.js

importing: reason_cli-3.3.3-580ac78e
importing: opam__slash__zed-1.6-1a87600d
importing: opam__slash__yojson-1.4.1-4fc64983
importing: opam__slash__utop-2.2.0-029f4aea
importing: opam__slash__result-1.3-ff74615f
importing: opam__slash__react-1.2.1-d0b77b3e
importing: opam__slash__ocamlfind-1.8.0-f9df3f0a
importing: opam__slash__ocamlbuild-0-8d2a94f9
importing: opam__slash__ocaml_migrate_parsetree-1.0.11-c9719175
importing: opam__slash__merlin_extend-0.3-43ba575e
importing: opam__slash__menhir-20171013-fad93bca
importing: opam__slash__lwt__react-1.1.1-099d2667
importing: opam__slash__lwt__log-1.1.0-0bf17afb
importing: opam__slash__lwt-4.1.0-6b8ce6b9
importing: opam__slash__lambda_term-1.13-27081838
importing: opam__slash__easy_format-1.3.1-4deff5a4
importing: opam__slash__camomile-1.0.1-e92b496f
importing: opam__slash__biniou-1.2.0-35ecab1b
importing: opam__slash__base_unix-base-015d9419
importing: opam__slash__base_threads-base-5a9711e8
importing: opam__slash__base_ocamlbuild-base-bbfb557f
importing: opam__slash__base_bytes-base-06f27e78
importing: ocaml-4.2.3004-aac759d5
importing: esy_ocaml__slash__rtop-3.3.0-26cde351
importing: esy_ocaml__slash__reason-3.3.3-3ee26860
importing: esy_ocaml__slash__merlin-3.0.5005-4f9a1302
tar: Ignoring unknown extended header keyword 'SCHILY.dev'
# ...
tar: Ignoring unknown extended header keyword 'SCHILY.nlink'
Done!
+ [email protected]
updated 1 package in 4.805s

the most important part being

This got me figuring out why ocamlmerlin for VSCode doesn't work for two hours or so. Could we do something about it? I might try taking stab at it if you point me in the right direction.

Cannot start ocamlmerlin - `ocaml/ocamlmerlin is not installed correctly`

cc @andreypopp re the chat on Discord

./node_modules/.bin/bsb -w works fine, however running ocaml or ocamlmerlin both fail:

➜ ocaml -version
/Users/jordan/.nvm/versions/node/v6.10.3/bin/ocaml: line 121: cd: /Users/jordan/.esy/store-3.x.x/_install/ocaml-4.02.3-90ad951bb234c3b1e1b5a03e3a5a261a84da222c/bin/../actualInstall: No such file or directory
/Users/jordan/.nvm/versions/node/v6.10.3/bin/ocaml: line 122: /Users/jordan/.esy/store-3.x.x/_install/ocaml-4.02.3-90ad951bb234c3b1e1b5a03e3a5a261a84da222c/bin/../node_modules/.bin/esy: No such file or directory

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

ocaml is not installed correctly. Either the initial installation
failed or the global build cache was purged, which cleared out the global
installation. Reinstall by doing:

  npm uninstall -g reason-cli
  npm install -g https://github.com/reasonml/reason-cli

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

➜ ocamlmerlin -version
/Users/jordan/.nvm/versions/node/v6.10.3/bin/ocamlmerlin: line 121: cd: /Users/jordan/.esy/store-3.x.x/_install/opam_alpha__slash__merlin-2.5.4-e82ed956b19d8e4a97c150a18ad33daa93f4734c/bin/../actualInstall: No such file or directory
/Users/jordan/.nvm/versions/node/v6.10.3/bin/ocamlmerlin: line 122: /Users/jordan/.esy/store-3.x.x/_install/opam_alpha__slash__merlin-2.5.4-e82ed956b19d8e4a97c150a18ad33daa93f4734c/bin/../node_modules/.bin/esy: No such file or directory

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

ocamlmerlin is not installed correctly. Either the initial installation
failed or the global build cache was purged, which cleared out the global
installation. Reinstall by doing:

  npm uninstall -g reason-cli
  npm install -g https://github.com/reasonml/reason-cli

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

rtop also returns a strange error:

/Users/jordan/.esy/store-3.x.x/_install/opam_alpha__slash__utop-1.19.3-6107f906d4c2979b17b5208b3130987bd73e715d/bin/utop: line 2: syntax error near unexpected token `C'
/Users/jordan/.esy/store-3.x.x/_install/opam_alpha__slash__utop-1.19.3-6107f906d4c2979b17b5208b3130987bd73e715d/bin/utop: line 2: `T�W%.7@IR[gt}���c(C'

It may be related, but vscode doesn't seem to be able to boot merlin either - it just shows [loading] endlessly; while the output shows:

undefined:1



SyntaxError: Unexpected end of JSON input
    at parse (<anonymous>)
    at /Users/jordan/.vscode/extensions/freebroccolo.reasonml-0.0.99/node_modules/lodash/lodash.js:5154:46
    at Interface._onLine (readline.js:245:5)
    at Interface.<anonymous> (readline.js:384:12)
    at Array.forEach (native)
    at Interface._normalWrite (readline.js:383:11)
    at Socket.ondata (readline.js:107:10)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at readableAddChunk (_stream_readable.js:176:18)
[Error - 10:11:09 pm] Connection to server got closed. Server will not be restarted.

I've tried uninstalling and reinstalling reason-cli on both master and beta-v-1.13.5, I've tried npm and yarn, switching to a different node version with nvm, updating npm, but none of these seem to have any effect.

Currently running:

  • macOS Sierra (10.12.3)
  • node 6.10.3
  • npm 4.6.1

uninstall Reason without uninstalling opam

I installed a new OCaml switch, 4.06.0, using opam. When I ran utop, I found that when I typed

#require "

as soon as I typed the quotation mark, I suddenly got a screenful of warnings about /usr/local/lib/node_modules/reason-cli/r/3____________________________________________/i/...<lib name> not found. I don't know why I would get these errors--very mysterious. I'd never seen them before, and I was not doing anything to my knowlege to reference these directories. Each subsequent character after the quotation mark seemed to cause another screen of the warnings.

I didn't remember installing ReasonML, but I guess I did at some point. So I ran
npm uninstall -g reason-cli, suggested in the README file, to get rid of Reason. I don't need it at the moment. This uninstalled opam. I don't want to install Reason right now, though (I need to get 4.06.0 working on its own, and I am not experimenting with Reason right now), so I had to reinstall opam (which turned out to be a pain in my case).

Automatically uninstalling opam as part of uninstalling Reason seems like a bad idea, since many people will want to use OCaml in general but try out Reason. How about suggesting an alternate procedure for uninstalling Reason while keeping the rest of the normal OCaml toolchain instact, with a note about different ways to uninstall?

(Looks like it may have uninstalled opam, too. Or is that something that happened when I was trying to fix the situation?)

Thanks-

Creating Releases Requires m4.

I'm having issues install on the latest debian, here's my terminal output:

localhost:~/reason npm install -g git://github.com/reasonml/reason-cli.git
/home/fortes/.local/bin/ocamlmerlin-reason -> /home/fortes/.local/lib/node_modules/reason-cli/.bin/ocamlmerlin-reason
/home/fortes/.local/bin/ocamlopt -> /home/fortes/.local/lib/node_modules/reason-cli/.bin/ocamlopt
/home/fortes/.local/bin/ocaml -> /home/fortes/.local/lib/node_modules/reason-cli/.bin/ocaml
/home/fortes/.local/bin/utop -> /home/fortes/.local/lib/node_modules/reason-cli/.bin/utop
/home/fortes/.local/bin/reopt -> /home/fortes/.local/lib/node_modules/reason-cli/.bin/reopt
/home/fortes/.local/bin/rebuild -> /home/fortes/.local/lib/node_modules/reason-cli/.bin/rebuild
/home/fortes/.local/bin/refmttype -> /home/fortes/.local/lib/node_modules/reason-cli/.bin/refmttype
/home/fortes/.local/bin/reactjs_jsx_ppx -> /home/fortes/.local/lib/node_modules/reason-cli/.bin/reactjs_jsx_ppx
/home/fortes/.local/bin/berror -> /home/fortes/.local/lib/node_modules/reason-cli/.bin/berror
/home/fortes/.local/bin/ocamlmerlin -> /home/fortes/.local/lib/node_modules/reason-cli/.bin/ocamlmerlin
/home/fortes/.local/bin/rtop -> /home/fortes/.local/lib/node_modules/reason-cli/.bin/rtop
/home/fortes/.local/bin/ocamlc -> /home/fortes/.local/lib/node_modules/reason-cli/.bin/ocamlc
/home/fortes/.local/bin/ocamlrun -> /home/fortes/.local/lib/node_modules/reason-cli/.bin/ocamlrun
/home/fortes/.local/bin/refmt -> /home/fortes/.local/lib/node_modules/reason-cli/.bin/refmt

> [email protected] postinstall /home/fortes/.local/lib/node_modules/reason-cli/node_modules/fastreplacestring
> g++ -Ofast -o ./.bin/fastreplacestring.exe ./fastreplacestring.cpp


> [email protected] postinstall /home/fortes/.local/lib/node_modules/reason-cli
> ./scripts/performActualInstallAndFixLinks.sh

esy install v0.21.0-0
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 0/33(node:15122) DeprecationWarning: crypto.createCredentials is deprecated. Use tls.createSecureContext instead.
(node:15122) DeprecationWarning: crypto.Credentials is deprecated. Use tls.SecureContext instead.
[3/4] Linking dependencies...
(node:15122) DeprecationWarning: Calling an asynchronous function without callback is deprecated.
(node:15122) DeprecationWarning: Calling an asynchronous function without callback is deprecated.
(node:15122) DeprecationWarning: Calling an asynchronous function without callback is deprecated.
(node:15122) DeprecationWarning: Calling an asynchronous function without callback is deprecated.
(node:15122) DeprecationWarning: Calling an asynchronous function without callback is deprecated.
(node:15122) DeprecationWarning: Calling an asynchronous function without callback is deprecated.
(node:15122) DeprecationWarning: Calling an asynchronous function without callback is deprecated.
(node:15122) DeprecationWarning: Calling an asynchronous function without callback is deprecated.
(node:15122) DeprecationWarning: Calling an asynchronous function without callback is deprecated.
(node:15122) DeprecationWarning: Calling an asynchronous function without callback is deprecated.
(node:15122) DeprecationWarning: Calling an asynchronous function without callback is deprecated.
(node:15122) DeprecationWarning: Calling an asynchronous function without callback is deprecated.
(node:15122) DeprecationWarning: Calling an asynchronous function without callback is deprecated.
(node:15122) DeprecationWarning: Calling an asynchronous function without callback is deprecated.
(node:15122) DeprecationWarning: Calling an asynchronous function without callback is deprecated.
(node:15122) DeprecationWarning: Calling an asynchronous function without callback is deprecated.
(node:15122) DeprecationWarning: Calling an asynchronous function without callback is deprecated.
(node:15122) DeprecationWarning: Calling an asynchronous function without callback is deprecated.
(node:15122) DeprecationWarning: Calling an asynchronous function without callback is deprecated.
(node:15122) DeprecationWarning: Calling an asynchronous function without callback is deprecated.
(node:15122) DeprecationWarning: Calling an asynchronous function without callback is deprecated.
(node:15122) DeprecationWarning: Calling an asynchronous function without callback is deprecated.
(node:15122) DeprecationWarning: Calling an asynchronous function without callback is deprecated.
(node:15122) DeprecationWarning: Calling an asynchronous function without callback is deprecated.
(node:15122) DeprecationWarning: Calling an asynchronous function without callback is deprecated.
(node:15122) DeprecationWarning: Calling an asynchronous function without callback is deprecated.
(node:15122) DeprecationWarning: Calling an asynchronous function without callback is deprecated.
(node:15122) DeprecationWarning: Calling an asynchronous function without callback is deprecated.
(node:15122) DeprecationWarning: Calling an asynchronous function without callback is deprecated.
(node:15122) DeprecationWarning: Calling an asynchronous function without callback is deprecated.
(node:15122) DeprecationWarning: Calling an asynchronous function without callback is deprecated.
(node:15122) DeprecationWarning: Calling an asynchronous function without callback is deprecated.
[4/4] Building fresh packages...
(node:15122) DeprecationWarning: Calling an asynchronous function without callback is deprecated.
success Saved lockfile.
Done in 11.87s.
 ◯ opam-installer-bin: building from source...
 ◯ substs: building from source...
 ◉ substs: build complete
 ◉ opam-installer-bin: build complete
 ◯ ocaml: building from source...
 ◉ ocaml: build complete
 ◯ @opam-alpha/base-threads: building from source...
 ◯ @opam-alpha/base-unix: building from source...
 ◯ @opam-alpha/conf-m4: building from source...
 ◯ @opam-alpha/result: building from source...
 ◯ @opam-alpha/conf-which: building from source...
 ◉ @opam-alpha/base-unix: build complete
 ◉ @opam-alpha/base-threads: build complete
 ◌ @opam-alpha/conf-m4: build failed, see:

  /home/fortes/.esy/store-3.x.x/_build/opam_alpha__slash__conf_m4-1.0.0-3a9f448f76d89787ff52bef5066967867a8d723f/_esy/build.log

for details
/home/fortes/dotfiles/symlinks/local/lib/node_modules/reason-cli/actualInstall/node_modules/.cache/_esy/build-eject/Makefile:183: recipe for target '@opam-alpha/conf-m4.build' failed
make: *** [@opam-alpha/conf-m4.build] Error 1
make: *** Waiting for unfinished jobs....
 ◉ @opam-alpha/conf-which: build complete
 ◉ @opam-alpha/result: build complete
./node_modules/.cache/_esy/build-eject:
bin  env  findlib.conf.in  Makefile  node_modules  sandbox.sb.in

./node_modules/.cache/_esy/store:
_build  _install  _insttmp
FAILED TO BUILD
npm ERR! Linux 3.14.0
npm ERR! argv "/home/fortes/dotfiles/symlinks/local/bin/node" "/home/fortes/.local/bin/npm" "install" "-g" "git://github.com/reasonml/reason-cli.git"
npm ERR! node v7.9.0
npm ERR! npm  v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1

npm ERR! [email protected] postinstall: `./scripts/performActualInstallAndFixLinks.sh`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script './scripts/performActualInstallAndFixLinks.sh'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the reason-cli package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     ./scripts/performActualInstallAndFixLinks.sh
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs reason-cli
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls reason-cli
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/fortes/.cache/npm/_logs/2017-05-09T19_27_42_363Z-debug.log

Permissions issues.

People tend to do sudo to globally install a module. But reason-cli quickly cds into actualInstall where we do the real install / build locally.

That second install is done as sudo, yet it's a local project from the perspective of yarn which is used under the hood. I believe there's some yarn permissions issues if the first time you ever create the ~/.cache/yarn directory is invoked with sudo. It will set perms to be root or something. The ~/.cache is to be used for local projects. If you install a local yarn project using sudo the same issue would likely happen.
I'm not sure what the solution is.

Unable to install using yarn

MacOS 10.12.6
Yarn v0.27.5

» sudo yarn global add https://github.com/reasonml/reason-cli/archive/beta-v-1.13.6-bin-darwin.tar.gz
yarn global v0.27.5
warning package.json: No license field
warning No license field
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
⠁
⠁
⠁
⠁
error /Users/srg/.config/yarn/global/node_modules/reason-cli: Command failed.
Exit code: 1
Command: sh
Arguments: -c ./postinstall.sh
Directory: /Users/srg/.config/yarn/global/node_modules/reason-cli
Output:
ERROR:
  /Volumes/Terra/Archive/sync/appdata/.config/yarn/global/node_modules/reason-cli/rel/3.x.x
Could not perform binary build or installation because the location you are installing to
is too 'deep' in the file system. That sounds like a strange limitation, but
the scripts contain shebangs that encode this path to executable, and posix
systems limit the length of those shebang lines to 127.
info Visit https://yarnpkg.com/en/docs/cli/global for documentation about this command.

On another machine I've got infinite resolving packages (stops on pend package)

yarn global add https://github.com/reasonml/reason-cli/archive/beta-v-1.13.6-bin-darwin.tar.gz            ~/dev 130 ↵
yarn global v0.27.5
warning package.json: No license field
warning No license field
[1/4] Resolving packages...
⠈ pend@~1.2.0

reason-cli '.tar.gz' NPM package errors on NPM update

Problem:

NPM v5.4.2 doesn't handle '.tar.gz' package format properly, on update errors and stops the update, might interfere with other extraneous packages too (but I didn't test it yet) :

On MacOS:

MacBook-Pro:~ intj$ npm -g update
npm ERR! code E404
npm ERR! 404 Registry returned 404 for GET on https://registry.npmjs.org/reason-cli
npm ERR! 404
npm ERR! 404 'reason-cli' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/intj/.npm/_logs/2017-10-03T10_14_41_827Z-debug.log
MacBook-Pro:~ intj$

On Ubuntu:

intj@intjDesktop:~ $ npm -g update
npm ERR! code E404
npm ERR! 404 Registry returned 404 for GET on https://registry.npmjs.org/reason-cli
npm ERR! 404
npm ERR! 404 'reason-cli' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/intj/.npm/_logs/2017-10-03T12_35_58_630Z-debug.log
intj@intjDesktop:~ $

Possible fix:
1 - Publish 'reason-cli' NPM package
2 - Deprecate '.tar.gz' package format

OSX: install (source) fails (but install binary succeeded)

Included terminal output, in case it is helpful.
Air:~> npm install -g git://github.com/reasonml/reason-cli.git#beta-v-1.13.5
/Users/desmond/.nvm/versions/node/v7.10.0/bin/ocamlc -> /Users/desmond/.nvm/versions/node/v7.10.0/lib/node_modules/reason-cli/.bin/ocamlc
/Users/desmond/.nvm/versions/node/v7.10.0/bin/ocamlrun -> /Users/desmond/.nvm/versions/node/v7.10.0/lib/node_modules/reason-cli/.bin/ocamlrun
/Users/desmond/.nvm/versions/node/v7.10.0/bin/ocamlmerlin-reason -> /Users/desmond/.nvm/versions/node/v7.10.0/lib/node_modules/reason-cli/.bin/ocamlmerlin-reason
/Users/desmond/.nvm/versions/node/v7.10.0/bin/ocaml -> /Users/desmond/.nvm/versions/node/v7.10.0/lib/node_modules/reason-cli/.bin/ocaml
/Users/desmond/.nvm/versions/node/v7.10.0/bin/ocamlopt -> /Users/desmond/.nvm/versions/node/v7.10.0/lib/node_modules/reason-cli/.bin/ocamlopt
/Users/desmond/.nvm/versions/node/v7.10.0/bin/rtop -> /Users/desmond/.nvm/versions/node/v7.10.0/lib/node_modules/reason-cli/.bin/rtop
/Users/desmond/.nvm/versions/node/v7.10.0/bin/utop -> /Users/desmond/.nvm/versions/node/v7.10.0/lib/node_modules/reason-cli/.bin/utop
/Users/desmond/.nvm/versions/node/v7.10.0/bin/reopt -> /Users/desmond/.nvm/versions/node/v7.10.0/lib/node_modules/reason-cli/.bin/reopt
/Users/desmond/.nvm/versions/node/v7.10.0/bin/refmttype -> /Users/desmond/.nvm/versions/node/v7.10.0/lib/node_modules/reason-cli/.bin/refmttype
/Users/desmond/.nvm/versions/node/v7.10.0/bin/refmt -> /Users/desmond/.nvm/versions/node/v7.10.0/lib/node_modules/reason-cli/.bin/refmt
/Users/desmond/.nvm/versions/node/v7.10.0/bin/reactjs_jsx_ppx -> /Users/desmond/.nvm/versions/node/v7.10.0/lib/node_modules/reason-cli/.bin/reactjs_jsx_ppx
/Users/desmond/.nvm/versions/node/v7.10.0/bin/rebuild -> /Users/desmond/.nvm/versions/node/v7.10.0/lib/node_modules/reason-cli/.bin/rebuild
/Users/desmond/.nvm/versions/node/v7.10.0/bin/ocamlmerlin -> /Users/desmond/.nvm/versions/node/v7.10.0/lib/node_modules/reason-cli/.bin/ocamlmerlin
/Users/desmond/.nvm/versions/node/v7.10.0/bin/berror -> /Users/desmond/.nvm/versions/node/v7.10.0/lib/node_modules/reason-cli/.bin/berror

[email protected] postinstall /Users/desmond/.nvm/versions/node/v7.10.0/lib/node_modules/reason-cli/node_modules/fastreplacestring
g++ -Ofast -o ./.bin/fastreplacestring.exe ./fastreplacestring.cpp

[email protected] postinstall /Users/desmond/.nvm/versions/node/v7.10.0/lib/node_modules/reason-cli
./scripts/performActualInstallAndFixLinks.sh

esy install v0.21.0-0
info No lockfile found.
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 0/33(node:25037) DeprecationWarning: crypto.createCredentials is deprecated. Use tls.createSecureContext instead.
(node:25037) DeprecationWarning: crypto.Credentials is deprecated. Use tls.SecureContext instead.
[3/4] 🔗 Linking dependencies...
(node:25037) DeprecationWarning: Calling an asynchronous function without callback is deprecated.
(node:25037) DeprecationWarning: Calling an asynchronous function without callback is deprecated.
(node:25037) DeprecationWarning: Calling an asynchronous function without callback is deprecated.
(node:25037) DeprecationWarning: Calling an asynchronous function without callback is deprecated.
(node:25037) DeprecationWarning: Calling an asynchronous function without callback is deprecated.
(node:25037) DeprecationWarning: Calling an asynchronous function without callback is deprecated.
(node:25037) DeprecationWarning: Calling an asynchronous function without callback is deprecated.
(node:25037) DeprecationWarning: Calling an asynchronous function without callback is deprecated.
(node:25037) DeprecationWarning: Calling an asynchronous function without callback is deprecated.
(node:25037) DeprecationWarning: Calling an asynchronous function without callback is deprecated.
(node:25037) DeprecationWarning: Calling an asynchronous function without callback is deprecated.
(node:25037) DeprecationWarning: Calling an asynchronous function without callback is deprecated.
(node:25037) DeprecationWarning: Calling an asynchronous function without callback is deprecated.
(node:25037) DeprecationWarning: Calling an asynchronous function without callback is deprecated.
(node:25037) DeprecationWarning: Calling an asynchronous function without callback is deprecated.
(node:25037) DeprecationWarning: Calling an asynchronous function without callback is deprecated.
(node:25037) DeprecationWarning: Calling an asynchronous function without callback is deprecated.
(node:25037) DeprecationWarning: Calling an asynchronous function without callback is deprecated.
(node:25037) DeprecationWarning: Calling an asynchronous function without callback is deprecated.
(node:25037) DeprecationWarning: Calling an asynchronous function without callback is deprecated.
(node:25037) DeprecationWarning: Calling an asynchronous function without callback is deprecated.
(node:25037) DeprecationWarning: Calling an asynchronous function without callback is deprecated.
(node:25037) DeprecationWarning: Calling an asynchronous function without callback is deprecated.
(node:25037) DeprecationWarning: Calling an asynchronous function without callback is deprecated.
(node:25037) DeprecationWarning: Calling an asynchronous function without callback is deprecated.
(node:25037) DeprecationWarning: Calling an asynchronous function without callback is deprecated.
(node:25037) DeprecationWarning: Calling an asynchronous function without callback is deprecated.
(node:25037) DeprecationWarning: Calling an asynchronous function without callback is deprecated.
(node:25037) DeprecationWarning: Calling an asynchronous function without callback is deprecated.
(node:25037) DeprecationWarning: Calling an asynchronous function without callback is deprecated.
(node:25037) DeprecationWarning: Calling an asynchronous function without callback is deprecated.
(node:25037) DeprecationWarning: Calling an asynchronous function without callback is deprecated.
[4/4] 📃 Building fresh packages...
(node:25037) DeprecationWarning: Calling an asynchronous function without callback is deprecated.
success Saved lockfile.
✨ Done in 21.52s.
◯ opam-installer-bin: building from source...
◯ substs: building from source...
◉ substs: build complete
◉ opam-installer-bin: build complete
◯ ocaml: building from source...
◌ ocaml: build failed, see:

/Users/desmond/.esy/store-3.x.x/_build/ocaml-4.02.3-90ad951bb234c3b1e1b5a03e3a5a261a84da222c/_esy/build.log

for details
make: *** [ocaml.build] Error 1
./node_modules/.cache/_esy/build-eject:
Makefile env node_modules
bin findlib.conf.in sandbox.sb.in

./node_modules/.cache/_esy/store:
_build _install _insttmp
FAILED TO BUILD
npm ERR! Darwin 15.6.0
npm ERR! argv "/Users/desmond/.nvm/versions/node/v7.10.0/bin/node" "/Users/desmond/.nvm/versions/node/v7.10.0/bin/npm" "install" "-g" "git://github.com/reasonml/reason-cli.git#beta-v-1.13.5"
npm ERR! node v7.10.0
npm ERR! npm v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1

npm ERR! [email protected] postinstall: ./scripts/performActualInstallAndFixLinks.sh
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script './scripts/performActualInstallAndFixLinks.sh'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the reason-cli package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! ./scripts/performActualInstallAndFixLinks.sh
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs reason-cli
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls reason-cli
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /Users/desmond/.npm/_logs/2017-06-17T16_47_53_275Z-debug.log

Manual Steps to Run on Windows with reason-react

Compiler Missing

Install g++ compiler by selecting it as an option while using installer at http://www.mingw.org/

Add
C:\MinGW\bin
to your Path.

Non-Windows Unix Syntax

cd C:\
git clone https://github.com/reasonml/reason-cli.git

Change package.json line:
"postinstall": "./scripts/performActualInstallAndFixLinks.sh"
to
"postinstall": ".\scripts\performActualInstallAndFixLinks.sh"

Possibly Unnecessary

Enable Bash and Developer Mode:
https://www.howtogeek.com/249966/how-to-install-and-use-the-linux-bash-shell-on-windows-10/

Install
cd C:\
npm install -g ./reasonml

Check
where ocamlmerlin refmt ocamlmerlin-reason

Test

npm install --save reason-react

Follow steps:
https://github.com/chenglou/reason-react-example

Edit the simple example to not say hello, and open it's index.html file in Chrome.

Error on installation

I executed sudo npm install -g git://github.com/reasonml/reason-cli.git#beta-v-1.13.3 on my home dir and got the following errors. (OSX 10.12.4)

npm ERR! Darwin 16.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "git://github.com/reasonml/reason-cli.git#beta-v-1.13.3"
npm ERR! node v6.10.2
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE

npm ERR! [email protected] postinstall: `./performActualInstallAndFixLinks.sh`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script './performActualInstallAndFixLinks.sh'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the reason-cli package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     ./performActualInstallAndFixLinks.sh
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs reason-cli
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls reason-cli
npm ERR! There is likely additional logging output above.

more on npm debug log

lwt's cmis magically available through ocamlfind but not its dll

Right now it seems like I can install reason-cli and get ocamlfind. Also it seems like when I run ocamlfind ocamlc -package lwt.unix -package lwt.ppx with that ocamlfind (and no opam installed at all) it will compile.
That's a bit surprising and a bit annoying, because when I try to run my executable I get a runtime dll loading errors:

Fatal error: cannot load shared library dlllwt-unix_stubs
Reason: dlopen(dlllwt-unix_stubs.so, 138): image not found

The reason seems to be that the env variable CAML_LD_LIBRARY_PATH doesn't point to anything so reason-cli's ocamlfind cannot find the lwt dll. I work around this issue by doing:

export CAML_LD_LIBRARY_PATH=/usr/local/lib/node_modules/reason-cli/rel/3.x.x________________________________________/i/opam_alpha__slash__lwt-2.7.0-234bd21d/lib/lwt

I'm thinking there's two ways to go about this:

  • prevent reason-cli's ocamlfind from compiling with lwt. I'm guessing lwt's just a dependency of something inside reason-cli, and ocamlfind happens to have the right metadata files or env variables to know about lwt's cmi files, which makes it compile. If we make it error that would be great, it'd force people to download opam to get actual lwt and will prevent all sorts of in-between hacks
  • fill up the CAML_LD_LIBRARY_PATH with lwt paths. I like this solution less because it's a bit magical that lwt happens to work but no other opam deps (well in reality anything that reason-cli depends on would work I'm guessing). But I find this solution better than the current situation.

What do you all think?

refmt removes necessary parenthesis

I don't know where an issue with refmt should be filed, so I apologize in advance if it should be posted elsewhere.

I was reading through http://reasonmlhub.com/exploring-reasonml/ch_functions.html (the section "Compatibility of function types with labeled parameters"), and trying to reproduce the examples locally when I encountered what seems to be a bug with refmt's handling of parenthesis.

Steps to reproduce:

MBP install experience

This is on a first gen retina MBP, which has been upgraded to Sierra but never reinstalled. In other words, it's far from clean.

First attempt resulted in this error:

>> Fatal error: Module CamlinternalLazy unavailable.

Second attempt resolved that simply by being a second attempt, but now it fails with:

*** opam-installer-bin: building from source...
*** substs: building from source...
env: python2: No such file or directory
make: *** [substs.build] Error 127
make: *** Waiting for unfinished jobs....
env: python2: No such file or directory
make: *** [opam-installer-bin.build] Error 127
*** ocaml: building from source...
env: python2: No such file or directory
make: *** [ocaml.build] Error 127

There is no python2 on my system, so I manually symlink it from python27. Still get the same error. Turns out my python is installed with macports which puts its stuff in /opt/local, so I put the symlink beside python27 in /opt/local/bin, and for whatever reason that doesn't seem to jive with the installer. So I uninstall python from macports and reinstall it with homebrew. I've been told that will correctly set up the python2 symlink for me. It doesn't. But i manually symlink it, now in /usr/local/bin and voilá. It works!

But it took a bit more tinkering than I'd like...

Company: backend merlin-company-backend error "merlin: error (end-of-file) trying to parse answer: " with args (candidates Js.)

This is an error I am having with reason-cli's merlin (I am unsure of whether I should post here, or on merlin's github page). I also tried using the which ocamlmerlin-reason binary, but got the same error.

To recreate this error, I just tried to enter at the top of the ReasonML file let a = Js. and inspected the Emacs messages.

Here is my configuration:

(defun shell-cmd (cmd)
     "Returns the stdout output of a shell command or nil if the command returned
      an error"
     (car (ignore-errors (apply 'process-lines (split-string cmd)))))

   (quelpa '(reason-mode :repo "reasonml-editor/reason-mode" :fetcher github :stable t))
   (use-package reason-mode
     :config
     (let* ((refmt-bin (shell-cmd "which refmt")))
       (when refmt-bin
	 (setq refmt-command refmt-bin)))
     (add-hook
      'reason-mode-hook
      (lambda ()
	(add-hook 'before-save-hook 'refmt-before-save nil t)
	(setq-local merlin-command "~/.nvm/versions/node/v9.9.0/bin/ocamlmerlin")
	(merlin-mode))))

I am happy to share any other details that might be relevant.

Unable to install reason-cli on Arch Linux

npm install -g git://github.com/reasonml/reason-cli.git results in this error:

error An unexpected error occurred: "Command failed: tar -xzf /home/glennsl/.cache/yarn/npm-@opam-alpha/react-1.2.0-f071a1308b6cad131c55cda8677823c3/.yarn-tarball.tgz --strip-components 1 -C /home/glennsl/.cache/yarn/npm-@opam-alpha/react-1.2.0-f071a1308b6cad131c55cda8677823c3\n\ngzip: stdin: not in gzip format\ntar: Child returned status 1\ntar: Error is not recoverable: exiting now\n".

Seems to be an issue with packages tared up on macs being incompatible with GNU tar.

> uname -a
Linux <redacted> 4.9.11-1-ARCH #1 SMP PREEMPT Sun Feb 19 13:45:52 UTC 2017 x86_64 GNU/Linux

> tar --version
tar (GNU tar) 1.29

An option for refmt line length

Is the max line length for refmt hardcoded at 120 chars? Or is there some option I’m missing?

In case the option doesn’t exist, I’d like to request it. I easily switch between 2 spaces and 4 spaces, but 120 cars for me is next to unreadable.

Auto Updating

It would be really sweet if reason-cli could detect when packages that it installs are out of date and should be updated. Where it's sorta like a cron job that runs everyday that will check each package to check if it's up to date. If it is it will offer to update that package.

This would probably be a mix of using update-notifier to prompt the actual update to the user and npm-check to determine when the packages are out of date. This would be better than reinstalling reason-cli in it's entirety every time a package is updated and instead only update reason-cli when a new package is added or the underlying implementation changes/improved.

Linux reason-cli 3.0.5 fails install with JS error.

This error is experienced when installing a package that was released with esy 0.0.70.

I'm on a pretty old version of node 4.2.6 (which is the default that is installed when I install in Ubuntu with apt I think).

screen shot 2018-02-28 at 12 18 20 am

This used to work, when I would create releases with previous versions of esy (though it could have been something else that changed). I will confirm which other versions work/don't work.

Unable to install reason-cli in a virtual machine behind a proxy

Hi there,

I'm trying to install reason-mli in a VirtualBox Linux machine, which is behind a proxy, but it somehow doesn't work. I followed this tutorial ttps://github.com/facebook/reason/tree/master/editorSupport/emacs to run the following command:

npm install -g git://github.com/reasonml/reason-cli.git

My proxy configuration list is something like below:

; userconfig /home/trungtq/.npmrc
http-proxy = "http://www....:80"
https-proxy = "http://www....:80/"
proxy = "http://www.....:80/"
registry = "http://registry.npmjs.org/"
strict-ssl = false

Here is the error after running npm install -g git://github.com/reasonml/reason-cli.git

npm ERR! git clone --template=/home/trungtq/.npm/_git-remotes/_templates --mirror git://github.com/reasonml/reason-cli.git /home/trungtq/.npm/_git-remotes/git-github-com-reasonml-reason-cli-git-90858a2f: Cloning into bare repository '/home/trungtq/.npm/_git-remotes/git-github-com-reasonml-reason-cli-git-90858a2f'...
npm ERR! git clone --template=/home/trungtq/.npm/_git-remotes/_templates --mirror git://github.com/reasonml/reason-cli.git /home/trungtq/.npm/_git-remotes/git-github-com-reasonml-reason-cli-git-90858a2f: fatal: unable to connect to github.com:
npm ERR! git clone --template=/home/trungtq/.npm/_git-remotes/_templates --mirror git://github.com/reasonml/reason-cli.git /home/trungtq/.npm/_git-remotes/git-github-com-reasonml-reason-cli-git-90858a2f: github.com[0: 192.30.255.112]: errno=No route to host
npm ERR! git clone --template=/home/trungtq/.npm/_git-remotes/_templates --mirror git://github.com/reasonml/reason-cli.git /home/trungtq/.npm/_git-remotes/git-github-com-reasonml-reason-cli-git-90858a2f: github.com[1: 192.30.255.113]: errno=No route to host
npm ERR! Linux 4.4.0-53-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "git://github.com/reasonml/reason-cli.git"
npm ERR! node v4.2.6
npm ERR! npm  v3.5.2
npm ERR! code 128

npm ERR! Command failed: git clone --template=/home/trungtq/.npm/_git-remotes/_templates --mirror git://github.com/reasonml/reason-cli.git /home/trungtq/.npm/_git-remotes/git-github-com-reasonml-reason-cli-git-90858a2f
npm ERR! Cloning into bare repository '/home/trungtq/.npm/_git-remotes/git-github-com-reasonml-reason-cli-git-90858a2f'...
npm ERR! fatal: unable to connect to github.com:
npm ERR! github.com[0: 192.30.255.112]: errno=No route to host
npm ERR! github.com[1: 192.30.255.113]: errno=No route to host
npm ERR! 
npm ERR! 
npm ERR! 
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     /home/trungtq/workspace/explore/reports/npm-debug.log

Could you please advise how I can handle this error?
Thanks!

Cannot install cli 3.1.0

I'm new to ocaml and reason. I have tried numerous times over the past two days to install the cli, but to no avail. I have tried the installation instructions on VM's with Linux Mint 17 and 18 and finally with Ubuntu 16.04.4. In every case, the error is the same: https://gist.github.com/bsommardahl/97664bd601f8b344174522647ca4130d

I'm hoping someone can see something that I'm missing. Here's some more information about my system config...

glibc

I noticed the following note in the readme.md: The installation requires glibc >=3.4.21. If you're on macOS, you should be good to go. If you're on Ubuntu, reason-cli requires Ubuntu 16.04. Otherwise the postinstall might fail.

After a fresh install of Ubuntu 16.04.4, the version of glibc seems to be 2.23-0ubuntu10 according to this:

Package: libc6
Architecture: amd64
Version: 2.23-0ubuntu10
Multi-Arch: same
Priority: required
Section: libs
Source: glibc
Origin: Ubuntu
Maintainer: Ubuntu Developers <[email protected]>
Original-Maintainer: GNU Libc Maintainers <[email protected]>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 10953
Depends: libgcc1
Suggests: glibc-doc, debconf | debconf-2.0, locales
Breaks: hurd (<< 1:0.5.git20140203-1), libtirpc1 (<< 0.2.3), locales (<< 2.23), locales-all (<< 2.23), lsb-core (<= 3.2-27), nscd (<< 2.23)
Replaces: libc6-amd64
Filename: pool/main/g/glibc/libc6_2.23-0ubuntu10_amd64.deb
Size: 2580230
MD5sum: fa06d9e551121f74f6ac5dbbab5f4043
SHA1: a7a25a7cca8aa8420b82b2e8a2d46dcee93f1aca
SHA256: bd05c3487325a4386dee6abb02ad904e1f2d8d3d0adc0df8e8f29168fbe2b5bb
Homepage: http://www.gnu.org/software/libc/libc.html
Description-en: GNU C Library: Shared libraries
 Contains the standard libraries that are used by nearly all programs on
 the system. This package includes shared versions of the standard C library
 and the standard math library, as well as many others.
Description-md5: fc3001b0b90a1c8e6690b283a619d57f
Task: minimal
Supported: 5y

Package: libc6
Priority: required
Section: libs
Installed-Size: 10947
Maintainer: Ubuntu Developers <[email protected]>
Original-Maintainer: GNU Libc Maintainers <[email protected]>
Architecture: amd64
Source: glibc
Version: 2.23-0ubuntu3
Replaces: libc6-amd64
Depends: libgcc1
Suggests: glibc-doc, debconf | debconf-2.0, locales
Breaks: hurd (<< 1:0.5.git20140203-1), libtirpc1 (<< 0.2.3), locales (<< 2.23), locales-all (<< 2.23), lsb-core (<= 3.2-27), nscd (<< 2.23)
Filename: pool/main/g/glibc/libc6_2.23-0ubuntu3_amd64.deb
Size: 2583544
MD5sum: eeb2f237384d67accc1998a7c791ead7
SHA1: 2a05d2a1466c7ce169deb4d72096e37874dff70b
SHA256: 68d69a0fb2dae7578a2a7054bc0cd5f0994d523f60d540bc6708ff3f2fb33e18
Description-en: GNU C Library: Shared libraries
 Contains the standard libraries that are used by nearly all programs on
 the system. This package includes shared versions of the standard C library
 and the standard math library, as well as many others.
Description-md5: fc3001b0b90a1c8e6690b283a619d57f
Multi-Arch: same
Homepage: http://www.gnu.org/software/libc/libc.html
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu
Supported: 5y
Task: minimal

node

Node and npm versions are as follows:

byron@ubuntu:~$ node -v
v8.10.0
byron@ubuntu:~$ npm -v
5.6.0

Failed to install with npm 5.6.0

macair:app $ npm --version
5.6.0
macair:app $ npm install -g https://github.com/reasonml/reason-cli/archive/3.0.4-bin-darwin.tar.gz
/usr/local/bin/ocamlmerlin-reason -> /usr/local/lib/node_modules/reason-cli/.bin/ocamlmerlin-reason
/usr/local/bin/refmt -> /usr/local/lib/node_modules/reason-cli/.bin/refmt
/usr/local/bin/reactjs_jsx_ppx_v2 -> /usr/local/lib/node_modules/reason-cli/.bin/reactjs_jsx_ppx_v2
/usr/local/bin/reactjs_jsx_ppx_v3 -> /usr/local/lib/node_modules/reason-cli/.bin/reactjs_jsx_ppx_v3
/usr/local/bin/reason-cli-esy-sandbox -> /usr/local/lib/node_modules/reason-cli/.bin/reason-cli-esy-sandbox
/usr/local/bin/refmttype -> /usr/local/lib/node_modules/reason-cli/.bin/refmttype
/usr/local/bin/utop -> /usr/local/lib/node_modules/reason-cli/.bin/utop
/usr/local/bin/rtop -> /usr/local/lib/node_modules/reason-cli/.bin/rtop
/usr/local/bin/rebuild -> /usr/local/lib/node_modules/reason-cli/.bin/rebuild
/usr/local/bin/reopt -> /usr/local/lib/node_modules/reason-cli/.bin/reopt
/usr/local/bin/ocamlmerlin -> /usr/local/lib/node_modules/reason-cli/.bin/ocamlmerlin

> [email protected] postinstall /usr/local/lib/node_modules/reason-cli
> ./bin/esyBuildRelease bin install

usage: mktemp [-d] [-q] [-t prefix] [-u] template ...
       mktemp [-d] [-q] [-u] -t prefix
usage: mktemp [-d] [-q] [-t prefix] [-u] template ...
       mktemp [-d] [-q] [-u] -t prefix
usage: mktemp [-d] [-q] [-t prefix] [-u] template ...
       mktemp [-d] [-q] [-u] -t prefix
usage: mktemp [-d] [-q] [-t prefix] [-u] template ...
       mktemp [-d] [-q] [-u] -t prefix
usage: mktemp [-d] [-q] [-t prefix] [-u] template ...
       mktemp [-d] [-q] [-u] -t prefix
usage: mktemp [-d] [-q] [-t prefix] [-u] template ...
       mktemp [-d] [-q] [-u] -t prefix
usage: mktemp [-d] [-q] [-t prefix] [-u] template ...
       mktemp [-d] [-q] [-u] -t prefix
usage: mktemp [-d] [-q] [-t prefix] [-u] template ...
       mktemp [-d] [-q] [-u] -t prefix
usage: mktemp [-d] [-q] [-t prefix] [-u] template ...
       mktemp [-d] [-q] [-u] -t prefix
usage: mktemp [-d] [-q] [-t prefix] [-u] template ...
       mktemp [-d] [-q] [-u] -t prefix
usage: mktemp [-d] [-q] [-t prefix] [-u] template ...
       mktemp [-d] [-q] [-u] -t prefix
usage: mktemp [-d] [-q] [-t prefix] [-u] template ...
       mktemp [-d] [-q] [-u] -t prefix
usage: mktemp [-d] [-q] [-t prefix] [-u] template ...
       mktemp [-d] [-q] [-u] -t prefix
usage: mktemp [-d] [-q] [-t prefix] [-u] template ...
       mktemp [-d] [-q] [-u] -t prefix
usage: mktemp [-d] [-q] [-t prefix] [-u] template ...
       mktemp [-d] [-q] [-u] -t prefix
usage: mktemp [-d] [-q] [-t prefix] [-u] template ...
       mktemp [-d] [-q] [-u] -t prefix
usage: mktemp [-d] [-q] [-t prefix] [-u] template ...
       mktemp [-d] [-q] [-u] -t prefix
usage: mktemp [-d] [-q] [-t prefix] [-u] template ...
       mktemp [-d] [-q] [-u] -t prefix
usage: mktemp [-d] [-q] [-t prefix] [-u] template ...
       mktemp [-d] [-q] [-u] -t prefix
usage: mktemp [-d] [-q] [-t prefix] [-u] template ...
       mktemp [-d] [-q] [-u] -t prefix
usage: mktemp [-d] [-q] [-t prefix] [-u] template ...
       mktemp [-d] [-q] [-u] -t prefix
usage: mktemp [-d] [-q] [-t prefix] [-u] template ...
       mktemp [-d] [-q] [-u] -t prefix
usage: mktemp [-d] [-q] [-t prefix] [-u] template ...
       mktemp [-d] [-q] [-u] -t prefix
usage: mktemp [-d] [-q] [-t prefix] [-u] template ...
       mktemp [-d] [-q] [-u] -t prefix
usage: mktemp [-d] [-q] [-t prefix] [-u] template ...
       mktemp [-d] [-q] [-u] -t prefix
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `./bin/esyBuildRelease bin install`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.¶

Can't install with npm 5.3.0

When trying to install with npm install -g https://github.com/reasonml/reason-cli/archive/beta-v-1.13.6-bin-linux.tar.gz, using npm 5.3.0, the installation fails with the following error:

/usr/local/bin/ocamlmerlin -> /usr/local/lib/node_modules/reason-cli/.bin/ocamlmerlin
/usr/local/bin/ocamlmerlin-reason -> /usr/local/lib/node_modules/reason-cli/.bin/ocamlmerlin-reason
/usr/local/bin/ocamlrun -> /usr/local/lib/node_modules/reason-cli/.bin/ocamlrun
/usr/local/bin/ocamlc -> /usr/local/lib/node_modules/reason-cli/.bin/ocamlc
/usr/local/bin/ocamlc.opt -> /usr/local/lib/node_modules/reason-cli/.bin/ocamlc.opt
/usr/local/bin/ocamlopt -> /usr/local/lib/node_modules/reason-cli/.bin/ocamlopt
/usr/local/bin/ocamlopt.opt -> /usr/local/lib/node_modules/reason-cli/.bin/ocamlopt.opt
/usr/local/bin/rtop -> /usr/local/lib/node_modules/reason-cli/.bin/rtop
/usr/local/bin/ocaml -> /usr/local/lib/node_modules/reason-cli/.bin/ocaml
/usr/local/bin/utop -> /usr/local/lib/node_modules/reason-cli/.bin/utop
/usr/local/bin/refmt -> /usr/local/lib/node_modules/reason-cli/.bin/refmt
/usr/local/bin/refmttype -> /usr/local/lib/node_modules/reason-cli/.bin/refmttype
/usr/local/bin/reopt -> /usr/local/lib/node_modules/reason-cli/.bin/reopt
/usr/local/bin/rebuild -> /usr/local/lib/node_modules/reason-cli/.bin/rebuild
/usr/local/bin/reactjs_jsx_ppx -> /usr/local/lib/node_modules/reason-cli/.bin/reactjs_jsx_ppx
/usr/local/bin/reactjs_jsx_ppx_2 -> /usr/local/lib/node_modules/reason-cli/.bin/reactjs_jsx_ppx_2
/usr/local/bin/berror -> /usr/local/lib/node_modules/reason-cli/.bin/berror
/usr/local/bin/menhir -> /usr/local/lib/node_modules/reason-cli/.bin/menhir
/usr/local/bin/ocamlfind -> /usr/local/lib/node_modules/reason-cli/.bin/ocamlfind
/usr/local/bin/reason-cli -> /usr/local/lib/node_modules/reason-cli/.bin/reason-cli

> [email protected] postinstall /usr/local/lib/node_modules/reason-cli
> ./postinstall.sh

gzip: rel.tar: Permission denied
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `./postinstall.sh`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/jim/.npm/_logs/2017-07-26T12_10_30_040Z-debug.log

Using my previous npm version (4.1.2), the installation does work. Haven't tried any other versions of npm, just thought you should know this.

Unable to install using npm 6 and node 10 on clean fedora 28

I'm running npm install -g [email protected] and it errors out >

[kenny@localhost /]$ npm install -g [email protected]
/home/kenny/.nvm/versions/node/v10.0.0/bin/ocamlmerlin -> /home/kenny/.nvm/versions/node/v10.0.0/lib/node_modules/reason-cli/.bin/ocamlmerlin
/home/kenny/.nvm/versions/node/v10.0.0/bin/ocamlmerlin-reason -> /home/kenny/.nvm/versions/node/v10.0.0/lib/node_modules/reason-cli/.bin/ocamlmerlin-reason
/home/kenny/.nvm/versions/node/v10.0.0/bin/utop -> /home/kenny/.nvm/versions/node/v10.0.0/lib/node_modules/reason-cli/.bin/utop
/home/kenny/.nvm/versions/node/v10.0.0/bin/refmt -> /home/kenny/.nvm/versions/node/v10.0.0/lib/node_modules/reason-cli/.bin/refmt
/home/kenny/.nvm/versions/node/v10.0.0/bin/reopt -> /home/kenny/.nvm/versions/node/v10.0.0/lib/node_modules/reason-cli/.bin/reopt
/home/kenny/.nvm/versions/node/v10.0.0/bin/rebuild -> /home/kenny/.nvm/versions/node/v10.0.0/lib/node_modules/reason-cli/.bin/rebuild
/home/kenny/.nvm/versions/node/v10.0.0/bin/rtop -> /home/kenny/.nvm/versions/node/v10.0.0/lib/node_modules/reason-cli/.bin/rtop
/home/kenny/.nvm/versions/node/v10.0.0/bin/reactjs_jsx_ppx_v3 -> /home/kenny/.nvm/versions/node/v10.0.0/lib/node_modules/reason-cli/.bin/reactjs_jsx_ppx_v3
/home/kenny/.nvm/versions/node/v10.0.0/bin/reactjs_jsx_ppx_v2 -> /home/kenny/.nvm/versions/node/v10.0.0/lib/node_modules/reason-cli/.bin/reactjs_jsx_ppx_v2
/home/kenny/.nvm/versions/node/v10.0.0/bin/reason-cli-esy-sandbox -> /home/kenny/.nvm/versions/node/v10.0.0/lib/node_modules/reason-cli/.bin/reason-cli-esy-sandbox
/home/kenny/.nvm/versions/node/v10.0.0/bin/refmttype -> /home/kenny/.nvm/versions/node/v10.0.0/lib/node_modules/reason-cli/.bin/refmttype

[email protected] postinstall /home/kenny/.nvm/versions/node/v10.0.0/lib/node_modules/reason-cli
./bin/esyBuildRelease bin install

make: *** [/home/kenny/.nvm/versions/node/v10.0.0/lib/node_modules/reason-cli/r/build-eject/Makefile:1104: /home/kenny/.nvm/versions/node/v10.0.0/lib/node_modules/reason-cli/r/build-eject//bin/fastreplacestring.exe] Error 127
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! [email protected] postinstall: ./bin/esyBuildRelease bin install
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/kenny/.npm/_logs/2018-05-08T09_49_43_294Z-debug.log

rtop won't start: "syntax error near unexpected token `$'\001\001C'`"

I'm running Arch linux.

I tried both yarn global add reason-cli and npm -g reason-cli. Both resulted in installation of [email protected]. Confusing! Running rtop gives me:

/home/micah/.npm-global/lib/node_modules/reason-cli/3_________________________________/i/opam__slash__utop-2.1.0-5c44d02e/bin/utop-full: line 2: syntax error near unexpected token `$'\001\001C''
/home/micah/.npm-global/lib/node_modules/reason-cli/3_________________________________/i/opam__slash__utop-2.1.0-5c44d02e/bin/utop-full: line 2: `T��W����%.7@IR[gt}���c(�C'

esy dependency causes error

A user reported having issues with reason-cli installation. The error comes after the merging of my PR for berror. I'm not sure that the error didn't exist prior to my PR. The user was unblocked by running the following:

  1. npm uninstall -g esy && npm install -g "git://github.com/reasonml/esy.git#beta-v0.0.2"
  2. npm uninstall -g git://github.com/reasonml/reason-cli.git && npm install -g git://github.com/reasonml/reason-cli.git

The difference is that they are installing esy globally prior to installation, i'm not certain why this happens and why the local esy dependency is not working. It may have to do with the fact that esy is available in the cli when globally installed as opposed to being tied to node_modules.

cc @jordwalke

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.