cryogen-project/cryogen

"Could not load template" when creating new project.

pablo-abc opened this issue · 10 comments

I am trying to create a new project using lein new cryogen my-blog and I am always getting the following error:

Could not load template, failed with: Syntax error macroexpanding clojure.core/fn at (clojure/core/unify.clj:83:18).

I am currently using Leiningen 2.9.1 on Java 8 (if that helps).

Can you give it another try? Version 0.3.8 should fix this.

@lacarmen Still failing. Is there something I should do on my end to make sure I'm using the right version?

It's working for me now, what's the output that you see from lein?

Literally the message I copied above. Just that. I'll try it also on my home computer later tonight.

Could there be a reason it's pulling a different version? I still don't understand the Leiningen magic much.

Ok. It's working on my home computer. Must be something else on my work computer.

I guess I will close this issue. Thanks a lot!

The same error happens to me:

lein new cryogen example
Could not load template, failed with: Syntax error macroexpanding clojure.core/fn at (clojure/core/unify.clj:83:18).

Lein & JDK version:

lein -v 
Leiningen 2.9.1 on Java 11.0.2 OpenJDK 64-Bit Server VM

The same happens with using just the base profile:

lein with-profile base new cryogen example
Could not load template, failed with: Syntax error macroexpanding clojure.core/fn at (clojure/core/unify.clj:83:18).
Error encountered performing task 'new' with profile(s): 'base'
Could not load template, failed with: Syntax error macroexpanding clojure.core/fn at (clojure/core/unify.clj:83:18).

It happens when I run it outside of the project directory.

If I clone the cryogen repo and run the lein new command inside it it works:

git clone git@github.com:cryogen-project/cryogen.git
cd cryogen

lein new cryogen example
Generating fresh 'lein new' Cryogen project.

@jumarko I don't have this problem myself but I'm on Java 8.

lein version
Leiningen 2.9.1 on Java 1.8.0_163 OpenJDK 64-Bit Server VM

Could you try it with an older Java version?

@lacarmen the same problem:

lein -v
Leiningen 2.9.1 on Java 1.8.0_171 Java HotSpot(TM) 64-Bit Server VM

rm -r /Users/jumar/.m2/repository/cryogen /Users/jumar/.m2/repository/cryogen-core /Users/jumar/.m2/repository/cryogen-markdown

lein with-profile base new cryogen example
Retrieving cryogen/lein-template/0.5.1/lein-template-0.5.1.pom from clojars
Retrieving cryogen/lein-template/0.5.1/lein-template-0.5.1.jar from clojars

Could not load template, failed with: Syntax error macroexpanding clojure.core/fn at (clojure/core/unify.clj:83:18).

@jumarko What do you have in your lein profiles? I'm not 100% sure that lein with-profile base completely removes all plugins.

Hmm. That's right.
I thought it would but it doesn't seem to be the case!

mv ~/.lein/profiles.clj ~/.lein/profiles.clj.backup

lein new cryogen example
Generating fresh 'lein new' Cryogen project.

ls -l
drwxr-xr-x  7 jumar  staff   224B Aug  9 07:00 example