dundalek / closh

Bash-like shell based on Clojure
Eclipse Public License 1.0
1.62k stars 66 forks source link

Unhandled error on Windows 7 #9

Closed 4mitch closed 6 years ago

4mitch commented 6 years ago

Seems it "closhed" in unahdled error on Windows 7. May be due to demokit dependency

C:\Users\4mithc\AppData\Roaming\npm-cache\_logs>closh
events.js:163
  throw er; // Unhandled 'error' event
      ^
Error: spawn lumo ENOENT
    at exports._errnoException (util.js:1050:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
    at onErrorNT (internal/child_process.js:367:16)
    at _combinedTickCallback (internal/process/next_tick.js:80:11)
    at process._tickCallback (internal/process/next_tick.js:104:9)
    at Module.runMain (module.js:607:11)
    at run (bootstrap_node.js:427:7)
    at startup (bootstrap_node.js:151:9)
    at bootstrap_node.js:542:3

I think of demokit because it's install also ends with `C:\Users\dfomin\AppData\Roaming\npm-cache_logs>npm install -g demokit C:\Users\dfomin\AppData\Roaming\npm\demokit -> C:\Users\dfomin\AppData\Roaming\n pm\node_modules\demokit\bin\demokit-cli.js

> demokit@7.0.0 postinstall C:\Users\dfomin\AppData\Roaming\npm\node_modules\dem
okit
> node install.js

events.js:163
      throw er; // Unhandled 'error' event
      ^

Error: spawn npm ENOENT
    at exports._errnoException (util.js:1050:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
    at onErrorNT (internal/child_process.js:367:16)
    at _combinedTickCallback (internal/process/next_tick.js:80:11)
    at process._tickCallback (internal/process/next_tick.js:104:9)
    at Module.runMain (module.js:607:11)
    at run (bootstrap_node.js:427:7)
    at startup (bootstrap_node.js:151:9)
    at bootstrap_node.js:542:3
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\
node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "demokit"
npm ERR! node v7.10.0
npm ERR! npm  v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1

npm ERR! demokit@7.0.0 postinstall: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the demokit@7.0.0 postinstall script 'node install.js'.`

And seems demokit is not supporting Windows

borkdude commented 6 years ago

Maybe this pull request solves it? https://github.com/dundalek/closh/pull/5/files

dundalek commented 6 years ago

@4mitch I just published the fix from the PR as v0.1.2. Could you try it out?

4mitch commented 6 years ago

@dundalek Well, this error has left. But that one occurs now

C:\Users\Dima>closh
ERROR in file closh/core.cljs
         (new)
         Function.cljs.core.ex_info.cljs$core$IFn$_invoke$arity$3 (NO_SOURCE_FILE :1928:72)
         Function.cljs.analyzer.error.cljs$core$IFn$_invoke$arity$3 (NO_SOURCE_FILE :2539:92)
         (NO_SOURCE_FILE :6020:354)
         z (NO_SOURCE_FILE :6021:263)
         (NO_SOURCE_FILE :6015:418)
         (NO_SOURCE_FILE :5913:190)
         Object.cljs.js.load_macros (NO_SOURCE_FILE :5886:384)
         (NO_SOURCE_FILE :5907:433)
         Object.cljs.js.load_macros (NO_SOURCE_FILE :5886:384)

Cannot find module 'glob'
         Function.Module._resolveFilename (module.cljs:527:15)
         Function.Module._load (module.cljs:476:23)
         Module.require (module.cljs:568:17)
         require (internal/module.cljs:11:18)
         (evalmachine.:5:19)
         ContextifyScript.Script.runInThisContext (vm.cljs:44:33)
         Object.runInThisContext (vm.cljs:116:38)
         (Object.lt)
         (Object.lumo.repl.caching_node_eval)
         (NO_SOURCE_FILE :6020:273)

Well. I definetely see 'glob' in c:\Users\Me\AppData\Roaming\npm\node_modules\closh\node_modules\. What could it be?

dundalek commented 6 years ago

Just published a fix in v0.1.3 that hopefully does it.

I don't run a windows machine to test it on. If this does not do the trick I am willing to claim windows unsupported and wait if some developer who runs windows can help out.

4mitch commented 6 years ago

Great! It works now! Plz close the issue

dundalek commented 6 years ago

Cool, thanks for testing!