jarohen / simple-brepl

A really simple plugin to start CLJS browser REPLs, built atop 'Weasel'
44 stars 2 forks source link

Can't run sample-project on Windows #5

Open mike-thompson-day8 opened 10 years ago

mike-thompson-day8 commented 10 years ago

I tried following the instructions for running the sample project on Windows 7:

D:\Git_repos\simple-brepl\sample-project>lein dev
java.io.IOException: Cannot run program "mkdir" (in directory "D:\Git_repos\simple-brepl\sample-project"): C
reateProcess error=2, The system cannot find the file specified
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1041)
        at java.lang.Runtime.exec(Runtime.java:617)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at clojure.lang.Reflector.invokeMatchingMethod(Reflector.java:93)
        at clojure.lang.Reflector.invokeInstanceMethod(Reflector.java:28)
        at leiningen.core.eval$sh.doInvoke(eval.clj:159)
        at clojure.lang.RestFn.applyTo(RestFn.java:137)
        at clojure.core$apply.invoke(core.clj:617)
        at leiningen.shell$shell_with_project.invoke(shell.clj:53)
        at leiningen.shell$shell.doInvoke(shell.clj:66)
        at clojure.lang.RestFn.invoke(RestFn.java:457)
        at clojure.lang.Var.invoke(Var.java:427)
        at clojure.lang.AFn.applyToHelper(AFn.java:172)
        at clojure.lang.Var.applyTo(Var.java:532)
        at clojure.core$apply.invoke(core.clj:619)
        at leiningen.core.main$resolve_task$fn__3029.doInvoke(main.clj:189)
        at clojure.lang.RestFn.applyTo(RestFn.java:139)
        at clojure.lang.AFunction$1.doInvoke(AFunction.java:29)
        at clojure.lang.RestFn.applyTo(RestFn.java:137)
        at clojure.core$apply.invoke(core.clj:619)
        at leiningen.core.main$apply_task.invoke(main.clj:230)
        at leiningen.core.main$resolve_and_apply.invoke(main.clj:234)
        at leiningen.do$do.doInvoke(do.clj:39)
        at clojure.lang.RestFn.invoke(RestFn.java:439)
        at clojure.lang.Var.invoke(Var.java:423)
        at clojure.lang.AFn.applyToHelper(AFn.java:167)
        at clojure.lang.Var.applyTo(Var.java:532)
        at clojure.core$apply.invoke(core.clj:619)
        at leiningen.core.main$resolve_task$fn__3029.doInvoke(main.clj:189)
        at clojure.lang.RestFn.invoke(RestFn.java:410)
        at clojure.lang.AFn.applyToHelper(AFn.java:161)
        at clojure.lang.RestFn.applyTo(RestFn.java:132)
        at clojure.lang.AFunction$1.doInvoke(AFunction.java:29)
        at clojure.lang.RestFn.applyTo(RestFn.java:137)
        at clojure.core$apply.invoke(core.clj:619)
        at leiningen.core.main$apply_task.invoke(main.clj:230)
        at leiningen.core.main$resolve_and_apply.invoke(main.clj:234)
        at leiningen.core.main$_main$fn__3092.invoke(main.clj:303)
        at leiningen.core.main$_main.doInvoke(main.clj:290)
        at clojure.lang.RestFn.invoke(RestFn.java:408)
        at clojure.lang.Var.invoke(Var.java:415)
        at clojure.lang.AFn.applyToHelper(AFn.java:161)
        at clojure.lang.Var.applyTo(Var.java:532)
        at clojure.core$apply.invoke(core.clj:617)
        at clojure.main$main_opt.invoke(main.clj:335)
        at clojure.main$main.doInvoke(main.clj:440)
        at clojure.lang.RestFn.invoke(RestFn.java:436)
        at clojure.lang.Var.invoke(Var.java:423)
        at clojure.lang.AFn.applyToHelper(AFn.java:167)
        at clojure.lang.Var.applyTo(Var.java:532)
        at clojure.main.main(main.java:37)
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
        at java.lang.ProcessImpl.create(Native Method)
        at java.lang.ProcessImpl.<init>(ProcessImpl.java:385)
        at java.lang.ProcessImpl.start(ProcessImpl.java:136)
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1022)
        ... 53 more
jarohen commented 10 years ago

Hi Mike,

Could you try replacing the 'mkdir' command in the project.clj alias with whatever the equivalent is for Windows? (I'm afraid I don't have access to a Windows box so can't reproduce this)

Thanks,

James

mike-thompson-day8 commented 10 years ago

Okay thanks for the pointer, now I can see the issue.

mkdir does exist on Windows, but of course, it doesn't take "-p"

I've googled around trying to understand how lein handles OS specific alias commands (I'm a bit new to all this) but I can't find much mention.

BTW, I got this to run manually, via

     mkdir  target\resources
     lein pdo cljsbuild auto, frodo

But I found I had to add the following dependency:

[org.clojure/data.json "0.2.5"]