deps-new

Aya 2021-03-21T13:46:02.002500Z

@aya has joined the channel

Aya 2021-03-21T13:49:32.004300Z

Hello guys, I'm fairly new to clojure. I'm following this tutorial https://www.youtube.com/watch?v=gIoadGfm5T8&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

Aya 2021-03-21T13:51:58.005Z

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

Aya 2021-03-21T13:54:50.006300Z

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

Aya 2021-03-21T13:55:59.006500Z

seancorfield 2021-03-21T16:33:58.008800Z

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

seancorfield 2021-03-21T16:35:51.010200Z

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

seancorfield 2021-03-21T16:37:06.011500Z

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

Aya 2021-03-21T17:20:38.012100Z

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

seancorfield 2021-03-21T17:23:10.013100Z

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

Aya 2021-03-21T17:26:56.014Z

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

Aya 2021-03-21T17:28:36.015600Z

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

seancorfield 2021-03-21T17:42:46.016300Z

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

seancorfield 2021-03-21T17:43:12.016900Z

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

seancorfield 2021-03-21T17:43:32.017400Z

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

seancorfield 2021-03-21T17:44:41.018Z

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"}}}}

seancorfield 2021-03-21T17:56:56.018500Z

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