This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-12-07
Channels
- # adventofcode (269)
- # beginners (100)
- # boot (6)
- # cider (4)
- # cljsrn (4)
- # clojure (161)
- # clojure-android (31)
- # clojure-argentina (2)
- # clojure-brasil (8)
- # clojure-greece (45)
- # clojure-india (2)
- # clojure-madison (2)
- # clojure-russia (17)
- # clojure-spec (4)
- # clojure-sweden (1)
- # clojure-uk (32)
- # clojurescript (93)
- # core-logic (2)
- # cursive (21)
- # data-science (2)
- # datomic (46)
- # defnpodcast (1)
- # duct (5)
- # emacs (21)
- # events (1)
- # fulcro (17)
- # graphql (13)
- # job (1)
- # jobs (2)
- # leiningen (11)
- # lumo (3)
- # off-topic (119)
- # om (4)
- # onyx (2)
- # planck (6)
- # portkey (12)
- # re-frame (5)
- # reagent (3)
- # ring (5)
- # shadow-cljs (27)
- # spacemacs (19)
- # specter (6)
- # unrepl (9)
Hi, I’m trying to create a new project using lein new droid foobar
but lein can’t find the template… Guessing I have to update some dependency somewhere. The lein-droid docs say “Lein-droid is a plugin for Leiningen, so you should make sure you have Leiningen 2.3 or higher installed. This is all installation you have to do.”
@ibcoleman lein version
will give you the version number (if you're new to clojure you probably have the latest version installed). But test that hypothesis and if it's greater than 2.3 then you can rule that out as a cause. My next hypothesis states that [lein-droid "0.4.3"]
is not in your ~/.lein/profiles.clj
file
thanks @gdeer81 The odd thing is it looks like it’s resolving http://clojars.org and maven to 127.0.0.1…
➜ Projects lein version
Could not transfer artifact lein-pprint:lein-pprint:jar:1.1.1 from/to central ( ): Connect to [localhost/127.0.0.1] failed: Connection refused (Connection refused)
Could not transfer artifact lein-pprint:lein-pprint:jar:1.1.1 from/to clojars ( ): Connect to [localhost/127.0.0.1] failed: Connection refused (Connection refused)
Could not transfer artifact lein-pprint:lein-pprint:pom:1.1.1 from/to central ( ): Connect to [localhost/127.0.0.1] failed: Connection refused (Connection refused)
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.
but if I just ping http://clojars.org or http://maven.org from the cl I get a normal resolution
Then lets follow the hypothesis that network configuration is preventing lein from connecting to clojars and maven
if I just do lein new app foobar
a new project is created w/ no issues. If I try to add any dependencies, it tries to pull them from localhost for some reason…
yes, this supports our hypothesis that it's a network issue since lein can use things are already on your machine
and yet:
➜ foobar ping
PING (151.101.201.128): 56 data bytes
64 bytes from 151.101.201.128: icmp_seq=0 ttl=59 time=7.657 ms
64 bytes from 151.101.201.128: icmp_seq=1 ttl=59 time=7.477 ms
64 bytes from 151.101.201.128: icmp_seq=2 ttl=59 time=4.471 ms
Wonder where lein is getting its name resolution from?ah yes, my hypothesis wasn't concise enough. The cause must be from a lein configuration. one I don't think I've ever seen before
➜ foobar lein version
Leiningen 2.8.1 on Java 1.8.0_112 Java HotSpot(TM) 64-Bit Server VM
(on a mac)oh wow I just noticed I am still on 2.7; let me upgrade so any tests I run will match closer with your situation
hrm, I also upgraded to 2.8 on my ubuntu laptop since the environment might be closer to a mac
I moved my profiles.clj as well and did lein new droid foo
and it worked on that machine as well
do you have any other random files in your ~/.m2
or ~/.lein
directories? Our hypothesis has boiled down to some random configuration somewhere is messing with leins idea of where the central repos are
Hmm, not that I can see:
➜ .lein ls -la ~/.lein
total 16
drwxr-xr-x 5 ian staff 160 Dec 7 11:08 .
drwxr-xr-x+ 64 ian staff 2048 Dec 7 11:54 ..
-rw-r--r-- 1 ian staff 136 Dec 7 11:03 profiles.clj.old
-rw-r--r-- 1 ian staff 28 Dec 7 10:36 repl-history
drwxr-xr-x 3 ian staff 96 Dec 7 09:43 self-installs
➜ .lein ls -la ~/.m2
total 0
drwxr-xr-x 3 ian staff 96 Jan 12 2017 .
drwxr-xr-x+ 64 ian staff 2048 Dec 7 11:54 ..
drwxr-xr-x 73 ian staff 2336 Dec 7 10:52 repository
no, this is the first install on this machine. via brew install clojure && brew install leiningen
okay, just to rule out OS level stuff can you boot into a guest session and install and run leiningen?
hey @gdeer81, I ran out of time--thanks for all your help--gotta hit this meeting though. Thanks again!