Closed alekseysotnikov closed 6 years ago
I don't run Mac so I am not able to test it. Maybe installing node using nvm might help.
I am working on an alternative build process (see #42) which means that installing would be just downloading a single file, which should prevent these kind of issues in the future.
It worked before on my Mac, but I get the same error after doing npm install -g lumo-cljs closh
.
@alekseysotnikov FWIW, I messed around with brew unlink node && brew link node
a bit and then it worked again.
Same problem here on a mac... Sad, because I'm really keen to use closh!
Here's the transcript of what I did to make it work.
Borkdude@MacBook-Pro-2 $ closh
Could not require closh.core
(new)
Function.cljs.core.ex_info.cljs$core$IFn$_invoke$arity$3 (NO_SOURCE_FILE <embedded>:2024:72)
Function.cljs.analyzer.error.cljs$core$IFn$_invoke$arity$3 (NO_SOURCE_FILE <embedded>:2639:92)
(NO_SOURCE_FILE <embedded>:5950:320)
(Object.lumo.repl.run_sync_BANG_)
Object.cljs.js.process_deps (NO_SOURCE_FILE <embedded>:5927:185)
Object.cljs.js.process_libs_deps (NO_SOURCE_FILE <embedded>:5930:60)
(NO_SOURCE_FILE <embedded>:5948:474)
(Object.lumo.repl.run_sync_BANG_)
Object.cljs.js.process_deps (NO_SOURCE_FILE <embedded>:5927:185)
Could not locate the bindings file. Tried:
→ /usr/local/lib/node_modules/closh/node_modules/deasync/build/deasync.node
→ /usr/local/lib/node_modules/closh/node_modules/deasync/build/Debug/deasync.node
→ /usr/local/lib/node_modules/closh/node_modules/deasync/build/Release/deasync.node
→ /usr/local/lib/node_modules/closh/node_modules/deasync/out/Debug/deasync.node
→ /usr/local/lib/node_modules/closh/node_modules/deasync/Debug/deasync.node
→ /usr/local/lib/node_modules/closh/node_modules/deasync/out/Release/deasync.node
→ /usr/local/lib/node_modules/closh/node_modules/deasync/Release/deasync.node
→ /usr/local/lib/node_modules/closh/node_modules/deasync/build/default/deasync.node
→ /usr/local/lib/node_modules/closh/node_modules/deasync/compiled/9.2.0/darwin/x64/deasync.node
bindings (/usr/local/lib/node_modules/closh/node_modules/bindings/bindings.cljs:88:9)
(/usr/local/lib/node_modules/closh/node_modules/deasync/index.cljs:34:32)
Object.<anonymous> (/usr/local/lib/node_modules/closh/node_modules/deasync/index.cljs:76:2)
Module._compile (module.cljs:641:30)
Object.Module._extensions..js (module.cljs:652:10)
Module.load (module.cljs:560:32)
tryModuleLoad (module.cljs:503:12)
Function.Module._load (module.cljs:495:3)
Module.require (module.cljs:585:17)
require (internal/module.cljs:11:18)
Borkdude@MacBook-Pro-2 $ brew link --overwrite npm
Warning: Already linked: /usr/local/Cellar/node/9.5.0
To relink: brew unlink node && brew link node
Borkdude@MacBook-Pro-2 $ brew unlink node && brew link node
Unlinking /usr/local/Cellar/node/9.5.0... 7 symlinks removed
Linking /usr/local/Cellar/node/9.5.0...
Error: Could not symlink bin/closh
Target /usr/local/bin/closh
already exists. You may want to remove it:
rm '/usr/local/bin/closh'
To force the link and overwrite all conflicting files:
brew link --overwrite node
To list all files that would be deleted:
brew link --overwrite --dry-run node
Borkdude@MacBook-Pro-2 $ brew unlink node && brew link --overwrite node
Unlinking /usr/local/Cellar/node/9.5.0... 0 symlinks removed
Linking /usr/local/Cellar/node/9.5.0... 884 symlinks created
Borkdude@MacBook-Pro-2 $ closh
$ (+ 1 2 3)
6
$ exit
Ok. I seem to have something else wrong:
➜ ~ closh
readlink: illegal option -- f
usage: readlink [-n] [file ...]
usage: dirname path
/Users/domparry/.nvm/versions/node/v9.6.0/bin/closh: line 10: realpath: command not found
usage: dirname path
usage: dirname path
/Users/domparry/.nvm/versions/node/v9.6.0/bin/closh: line 15: /lumo: No such file or directory
/Users/domparry/.nvm/versions/node/v9.6.0/bin/closh: line 15: exec: /lumo: cannot execute: No such file or directory
➜ ~
OK. Mine is solved. I was attempting to install dundalek/closh version to get tab completion... installing just closh works...
@domparry That's a different issue. I just created #52 to track that.
This should not happen anymore, please open a new issue if another installation error appears.
I am zero in Node JS. Could someone advice me what need to do to fix it?