{"id":1563,"date":"2022-08-19T07:02:54","date_gmt":"2022-08-19T07:02:54","guid":{"rendered":"http:\/\/sdi.thoughtstorms.info\/?p=1563"},"modified":"2022-08-19T07:02:54","modified_gmt":"2022-08-19T07:02:54","slug":"starting-a-clojurescript-project-in-2022","status":"publish","type":"post","link":"https:\/\/sdi.thoughtstorms.info\/?p=1563","title":{"rendered":"Starting a ClojureScript Project in 2022"},"content":{"rendered":"\n<p>I needed to start a simple ClojureScript project in 2022. And it was a faff.<\/p>\n\n\n\n<p>I love Clojure. But creating projects has become much harder because of so many different ways to do it, different and changing tools, and outdated online documentation.<\/p>\n\n\n\n<p><strong>So tl;dr:<\/strong><\/p>\n\n\n\n<p>I seem to have found a solution that works for me. <strong>August 19, 2022<\/strong><\/p>\n\n\n\n<p><strong>Step 1: Make sure you have up-to-date Clojure CLI tools.<\/strong><\/p>\n\n\n\n<p>I had Clojure 1.10.1 and none of the tutorials I found worked; and just got incomprehensible error messages.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>If you ever see an error message like : <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>-T is no longer supported, use -A with repl, -M for main, or -X for exec<\/code><\/pre>\n\n\n\n<p>That&#8217;s a definite sign you have an outdated version.<\/p>\n\n\n\n<p>I had 1.10.1 because that&#8217;s the current Ubuntu version. It&#8217;s outdated, so install CLI yourself. You want 1.11.1 (as of time of writing)<\/p>\n\n\n\n<p>I used<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>curl -O https:\/\/download.clojure.org\/install\/linux-install-1.11.1.1155.sh\nchmod +x linux-install-1.11.1.1155.sh\nsudo .\/linux-install-1.11.1.1155.sh<\/code><\/pre>\n\n\n\n<p>Check your version with  <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>clj -Mtools<\/code><\/pre>\n\n\n\n<p><strong>Step 2: Install clj-new<\/strong><\/p>\n\n\n\n<p>Useful tool or library from Sean Corfield<\/p>\n\n\n\n<p>See <a href=\"https:\/\/github.com\/seancorfield\/clj-new\">https:\/\/github.com\/seancorfield\/clj-new<\/a> <\/p>\n\n\n\n<p><strong>Step 3 : Using clj-new install from the figwheel-main template.<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>clojure -Tclj-new create :template figwheel-main :name myname\/myapp :args '[\"+deps\",\"\u2013reagent\"]'<\/code><\/pre>\n\n\n\n<p><strong>Then run the app with<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>clojure -M:fig:build\n<\/code><\/pre>\n\n\n\n<p>I hope this helps anyone else with similar confusion to me.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>For a long discussion \/ pleading \/ ranting, see <a href=\"https:\/\/clojureverse.org\/t\/starting-a-new-clojurescript-project-in-2022-setup-suggestions\/9222\/18\">https:\/\/clojureverse.org\/t\/starting-a-new-clojurescript-project-in-2022-setup-suggestions\/9222\/18<\/a> and <a href=\"https:\/\/clojureverse.org\/t\/the-further-adventures-of-starting-a-new-clojurescript-project-in-2022\/9228\">https:\/\/clojureverse.org\/t\/the-further-adventures-of-starting-a-new-clojurescript-project-in-2022\/9228<\/a> . And thanks to everyone on Clojureverse who took time and patience to help me get this working.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I needed to start a simple ClojureScript project in 2022. And it was a faff. I love Clojure. But creating projects has become much harder because of so many different ways to do it, different and changing tools, and outdated online documentation. So tl;dr: I seem to have found a solution that works for me. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,6],"tags":[67],"class_list":["post-1563","post","type-post","status-publish","format-standard","hentry","category-tools","category-troubleshooting","tag-clojurescript"],"_links":{"self":[{"href":"https:\/\/sdi.thoughtstorms.info\/index.php?rest_route=\/wp\/v2\/posts\/1563","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sdi.thoughtstorms.info\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sdi.thoughtstorms.info\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sdi.thoughtstorms.info\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sdi.thoughtstorms.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1563"}],"version-history":[{"count":0,"href":"https:\/\/sdi.thoughtstorms.info\/index.php?rest_route=\/wp\/v2\/posts\/1563\/revisions"}],"wp:attachment":[{"href":"https:\/\/sdi.thoughtstorms.info\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1563"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sdi.thoughtstorms.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1563"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sdi.thoughtstorms.info\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1563"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}