Comments (8)
@dgr Can you run lein -v
and copy here what you see?
I am unable to reproduce this issue.
~/gadfly/temp$ lein -v
Leiningen 2.7.1 on Java 1.8.0_121 OpenJDK 64-Bit Server VM
~/gadfly/temp$ rm -rf ~/.m2/repository/re-frame/
~/gadfly/temp$ lein new re-frame foo
Retrieving re-frame/lein-template/0.3.2/lein-template-0.3.2.pom from clojars
Retrieving re-frame/lein-template/0.3.2/lein-template-0.3.2.jar from clojars
Generating re-frame project.
from re-frame-template.
@dgr Ping
Can you please try:
lein -v
rm -rf ~/.m2/repository/re-frame/
lein new re-frame foo
And copy the console log here
from re-frame-template.
Sorry for the delay. Here is the output of lein -v
:
Leiningen 2.8.1 on Java 1.8.0_45 Java HotSpot(TM) 64-Bit Server VM
This is on MacOS 10.13.2 (High Sierra), running leiningen installed via brew.
from re-frame-template.
I tried removing the re-frame Maven info and it still didn't work:
Davids-MacBook-Pro:clojure dave$ rm -rf ~/.m2/repository/re-frame
Davids-MacBook-Pro:clojure dave$ lein new re-frame foo
java.lang.NullPointerException: null
at clojure.core$apply.invokeStatic (core.clj:648)
clojure.core$apply.invoke (core.clj:641)
leiningen.new$create.invokeStatic (new.clj:81)
leiningen.new$create.doInvoke (new.clj:57)
clojure.lang.RestFn.invoke (RestFn.java:425)
clojure.lang.AFn.applyToHelper (AFn.java:156)
clojure.lang.RestFn.applyTo (RestFn.java:132)
clojure.core$apply.invokeStatic (core.clj:650)
clojure.core$apply.invoke (core.clj:641)
leiningen.new$new.invokeStatic (new.clj:204)
leiningen.new$new.doInvoke (new.clj:134)
clojure.lang.RestFn.invoke (RestFn.java:439)
clojure.lang.Var.invoke (Var.java:388)
clojure.lang.AFn.applyToHelper (AFn.java:160)
clojure.lang.Var.applyTo (Var.java:700)
clojure.core$apply.invokeStatic (core.clj:648)
clojure.core$apply.invoke (core.clj:641)
leiningen.core.main$partial_task$fn__4667.doInvoke (main.clj:284)
clojure.lang.RestFn.applyTo (RestFn.java:139)
clojure.lang.AFunction$1.doInvoke (AFunction.java:29)
clojure.lang.RestFn.applyTo (RestFn.java:137)
clojure.core$apply.invokeStatic (core.clj:648)
clojure.core$apply.invoke (core.clj:641)
leiningen.core.main$apply_task.invokeStatic (main.clj:334)
leiningen.core.main$apply_task.invoke (main.clj:320)
leiningen.core.main$resolve_and_apply.invokeStatic (main.clj:340)
leiningen.core.main$resolve_and_apply.invoke (main.clj:336)
leiningen.core.main$_main$fn__4734.invoke (main.clj:420)
leiningen.core.main$_main.invokeStatic (main.clj:411)
leiningen.core.main$_main.doInvoke (main.clj:408)
clojure.lang.RestFn.invoke (RestFn.java:436)
clojure.lang.Var.invoke (Var.java:388)
clojure.lang.AFn.applyToHelper (AFn.java:160)
clojure.lang.Var.applyTo (Var.java:700)
clojure.core$apply.invokeStatic (core.clj:646)
clojure.main$main_opt.invokeStatic (main.clj:314)
clojure.main$main_opt.invoke (main.clj:310)
clojure.main$main.invokeStatic (main.clj:421)
clojure.main$main.doInvoke (main.clj:384)
clojure.lang.RestFn.invoke (RestFn.java:482)
clojure.lang.Var.invoke (Var.java:401)
clojure.lang.AFn.applyToHelper (AFn.java:171)
clojure.lang.Var.applyTo (Var.java:700)
clojure.main.main (main.java:37)
Davids-MacBook-Pro:clojure dave$
from re-frame-template.
BTW, just some more info... I don't see lein trying to download any dependencies that might exist for the template. Typically, when I first use a template, it will download a large amount of stuff. I don't see that this time. Not sure if that's helpful or not.
from re-frame-template.
@dgr That is helpful because if you were to successfully remove the most recent version of the re-frame template from your .m2 directory ... it should have to re-download it. For example:
~/gadfly/temp$ rm -rf ~/.m2/repository/re-frame/
~/gadfly/temp$ lein new re-frame foo
Retrieving re-frame/lein-template/0.3.3/lein-template-0.3.3.pom from clojars
Retrieving re-frame/lein-template/0.3.3/lein-template-0.3.3.jar from clojars
Generating re-frame project.
Looking at your log, I see this:
Davids-MacBook-Pro:clojure dave$ lein new re-frame foo
java.lang.NullPointerException: null
Which means either a) there is a null pointer exception before lein tries to re-download the re-frame-template to .m2 ... or b) your .m2 directory is located somewhere else and you never actually deleted the re-frame directory from .m2
Regarding a) ... does lein work in general? If you try lein new reagent foo
does that work? (I am sure it likely does, but just trying to cover that base)
Regarding b) ... can you confirm the location of your .m2 directory? I am a linux user and don't recall where mac / brew would place that.
from re-frame-template.
(a) Yes, lein works in general. No problems with any other template that I have found thus far. I did lein new reagent foo
and it worked great.
(b) Here's where .m2 is located:
Davids-MacBook-Pro:clojure dave$ cd ~/.m2
Davids-MacBook-Pro:.m2 dave$ pwd
/Users/dave/.m2
from re-frame-template.
OK, I just sort of solved it. At least I got it to work now, but I'm not sure why this would be throwing it off. I started poking around in my ~/.lein/profiles.clj
and found {:user {:plugins [[luminus/lein-template "2.9.10.95"]]}}
in there for some reason. I commented out that template and re-ran lein new re-frame foo
and it correctly downloaded the re-frame template from clojars and did its thing.
Now, the question is, why would that be the case? Why did the other templates work just fine while re-frame did not? I think I was reading a book about Luminus at one point and it had me put that into my profiles.clj, for what reason, I don't know (maybe to lock the luminus version to the specific one used in the book??).
I have no idea how the lein template system works, but I suspect that it's dynamically dispatching to the template code based on some sort of name and that Luminus probably had some sort of name clash with whatever re-frame was trying to do. But I don't really know what I'm talking about, so that could be totally wrong, too.
Anyway, the immediate problem is resolved and it was my environment at fault. We can probably close this issue, although it might be worth it to understand what was happening to at least document it if somebody ever bumps into it again.
from re-frame-template.
Related Issues (20)
- Unable to run `lein dev` HOT 8
- npm dependency is culled out when I run lein dev HOT 20
- Installation instructions for newbies HOT 4
- Add lein-scss option HOT 2
- The upgrade of shadow-cljs to 2.10.17 breaks cider-jack-in-cljs HOT 8
- server.clj errors when port is given from environment HOT 1
- REPL Jack-in is not working at the Calva under WSL2 HOT 4
- How to have the app.HASH.js being automatically referenced in the index.html? HOT 1
- Watch backend task HOT 2
- Add cider/cider-nrepl plugin HOT 3
- The required namespace "react" is not available HOT 7
- `lein watch` crashes on new project if `yarn` is used HOT 3
- Calva jack-in and connect broken since shift to shadow-cljs only
- Missing project.clj file HOT 3
- Make a fallback to index.html correctly HOT 1
- Hot reloading can break navigation with +routes option HOT 2
- Conduit is overrun with spam. Demo unviewable
- Browser console error - "The message port was closed before a response was received" HOT 3
- Template resource 'leiningen/new/re_frame/.github/workflows/test.yaml' not found. HOT 2
- clj-kondo config is not rendered correctly
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from re-frame-template.