Unrepl / unravel

Unravel your REPL
171 stars 6 forks source link

Unravel can not find lumo #71

Open didibus opened 6 years ago

didibus commented 6 years ago

My npm installs global packages under /usr/local/lib/node_modules, but when I start unravel, it looks like it is looking for lumo to be under: /usr/lib/node_modules.

This is the exact error I get:

/usr/local/bin/unravel: line 12: /usr/lib/node_modules/unravel-repl/node_modules/lumo-cljs/bin/lumo: No such file or directory
pesterhazy commented 6 years ago

Thanks for the report. Could you clarify

kommen commented 5 years ago

I'm running into the same or at least similar issue, this is on macOS 10.14.5 (18F132)

$ pwd
/Users/kommen
$ unravel
  File "<string>", line 1
    import os,sys; print os.path.realpath(sys.argv[1])
                          ^
SyntaxError: invalid syntax
/usr/local/bin/unravel: line 20: /Users/kommen/../node_modules/lumo-cljs/bin/lumo: No such file or directory
/usr/local/bin/unravel: line 20: exec: /Users/kommen/../node_modules/lumo-cljs/bin/lumo: cannot execute: No such file or directory
$ type -a npm 
npm is /usr/local/bin/npm
$ type -a lumo      
lumo is /usr/local/bin/lumo

I've installed unravel via homebrew: brew install unrepl/bin/unravel

 $ brew info unrepl/bin/unravel
unrepl/bin/unravel: stable 0.3.0-beta.2-1
Command-line client for Clojure REPLs
https://github.com/pesterhazy/unravel
/usr/local/Cellar/unravel/0.3.0-beta.2-1 (2,298 files, 74.2MB) *
  Built from source on 2019-07-11 at 23:43:45
From: https://github.com/unrepl/homebrew-bin/blob/master/unravel.rb
==> Dependencies
Required: clojure ✔
kommen commented 5 years ago

Looking into what bin/unravel does, it seems to expect that it's node_module dependencies are in the same dir as the binary. This is not the case when it is installed via brew. By pre-configuring UNRAVEL_HOME to point to the dir where brew installs unravel and it's deps, I can get it to work:

$ UNRAVEL_HOME=/usr/local/Cellar/unravel/0.3.0-beta.2-1 unravel 
Unravel 0.3.0-beta.2 connected to localhost:54846

Type ^O for full docs of symbol under cursor, ^D to quit,
^up and ^down to navigate history, ^C to interrupt current evaluation.
Enter #__help for help

user=>