Fork me on GitHub
#leiningen
<
2018-10-16
>
mping09:10:54

hi, it seems I can’t use lein new --force and pass template parameters

mping09:10:47

i’m hitting an exception

mping09:10:56

clojure.lang.ArityException: Wrong number of args (2) passed to: default/default

dfcarpenter19:10:45

I cannot for the life of me figure out how I messed up leiningen but I have uninstalled / reinstalled and am just baffled. I am a beginner btw. I am for example trying to use the pedestal template.

lein new pedestal-service iotmeow
Failed to resolve version for pedestal-service:lein-template:jar:RELEASE: Could not find metadata pedestal-service:lein-template/maven-metadata.xml in local (/Users/dan/.m2/repository)
Failed to resolve version for pedestal-service:lein-template:jar:RELEASE: Could not find metadata pedestal-service:lein-template/maven-metadata.xml in local (/Users/dan/.m2/repository)
This could be due to a typo in :dependencies, file system permissions, or network issues.
If you are behind a proxy, try setting the 'http_proxy' environment variable.
Could not find template pedestal-service on the classpath.

manutter5119:10:41

Leiningen uses a couple “hidden” directories, ~/.lein and ~/.m2. If you want a really clean re-install, you can try 1) uninstall lein 2) rename .lein to old.lein, 3) rename .m2 to old.m2 and 4) re-install lein

manutter5119:10:10

(I prefer to rename dirs instead of just deleting them so I can “undo” the deletion if I want)

dfcarpenter19:10:26

Hmm still nothing. I am just working from home on my normal wifi and this has worked before. Not behind a proxy.

manutter5119:10:51

Odd. Well, at this point you’ve got new .lein and .m2 dirs, if you want you can delete them and name the old.lein and old.m2 back, might save you some download time on other projects.

manutter5119:10:08

As to the error you’re getting, not sure why that is

manutter5119:10:56

I just tried lein new pedestal-service iotmeow locally, and it came right up for me, no errors.

mikerod19:10:41

@dfcarpenter what version of lein are you using?

mikerod19:10:23

sure you have internet connection? hah

mikerod19:10:19

DEBUG=true lein new pedestal-service iotmeow
do you get any more info that way?

dfcarpenter19:10:23

It just tells me that the classpath is Leiningen's classpath: :/usr/local/Cellar/leiningen/2.8.1/libexec/leiningen-2.8.1-standalone.jar

mikerod19:10:34

Not a great answer, but maybe try just to see, putting:

[pedestal-service/lein-template "0.5.4"]

mikerod19:10:46

in your ~/.lein/profiles.clj under the project key path [:user :dependencies]

mikerod19:10:42

edited that a bit to get the right project map keypath

dfcarpenter19:10:01

Odd I changed java versions and it worked. I switched from jdk 10.0.2 to jdk 11

mikerod19:10:03

oh, that’s pretty weird

mikerod19:10:14

but I haven’t done a ton of testing/using of anything with jdk10

dfcarpenter19:10:11

So I had initially setup my new macbook with 11. But ran into some issues then went down to 10 and things had been a little wonky with lein and a few other things. Now I just switched back to 11 and lein seems to be happy again

mikerod19:10:07

No idea what could have been the issue there then

mikerod19:10:18

Your living on the cutting edge though

mikerod19:10:28

hah, well I guess 11 is the stable one