Fork me on GitHub
#deps-new
<
2021-03-21
>
Aya13:03:32

Hello guys, I'm fairly new to clojure. I'm following this tutorial https://www.youtube.com/watch?v=gIoadGfm5T8&amp;feature=youtu.be by Sean for Repl Driven design and when I run the code to create a new project I get an error

clojure -X:new :template app :name aya/toppers          
No function found on command line or in :exec-fn
I installed Lein and Clojure-CLI

Aya13:03:58

I can't seem to find any well documented tutorials on how to fix this on the net

Aya13:03:50

I tried adding Aliasses as it is said here https://github.com/seancorfield/clj-new but whenever add that piece of code I get the error

Error building classpath. Error reading edn. Map literal must contain an even number of forms (/home/aya/.clojure/deps.edn)
Here is what my deps.edn looks like

seancorfield16:03:58

@aya your deps.edn file has some illegal syntax: line 38, remove the three dots.

seancorfield16:03:51

A lot of programming documentation uses ellipsis (three dots) just to mean "more stuff goes here".

seancorfield16:03:06

But I will change that in the README so it can't be misconstrued.

Aya17:03:38

Hi @seancorfield I get the same error after removing the three dots

seancorfield17:03:10

Then you still have a syntax error in your deps.edn file. Can you share the updated version?

Aya17:03:56

Here's my updated deps.edn file I installed the ClojureCLI by following the steps here

Aya17:03:36

I'm coming from a Javascript background so I'm wondering if clj-new is a global dependency I should be installing somewhere

seancorfield17:03:46

No, there’s not really a concept of “installing” things with Clojure (or Java). You just have dependencies.

seancorfield17:03:12

OK, the syntax error is due to having that extra set of { .. } around :aliases.

seancorfield17:03:32

The syntax for deps.edn is that :aliases is a top-level key.

seancorfield17:03:41

I’ve removed all the comments to make it easier to read — this should be your entire deps.edn file contents:

{:aliases
 {:new {:extra-deps {com.github.seancorfield/clj-new {:mvn/version "1.1.264"}}
        :exec-fn clj-new/create
        :exec-args {:template "app"}}}}

seancorfield17:03:56

I’ve updated the README so it hopefully clearer now @aya https://github.com/seancorfield/clj-new#getting-started