Push fails by not finding an artifact in S3

After finished the ions tutorial, I wanted to play a bit with it with an SPA.

So I had to enable CORS, and following AWS API-GW documentation, I decided to change the Lambda function. I supposed to do it in the code, by adding an HTTP header in the items-by-type function:

      {:status 200
       :headers {"Content-Type" "application/edn"
                 "Access-Control-Allow-Origin" "*"} ;; <- Here
       :body (-> (self-describing-items-by-type (d/db (get-connection)) type)
                 pp-str)}

After committing the change, I ran:

clojure -A:dev -m datomic.ion.dev '{:op :push}'

But received this message:

Downloading: com/datomic/java-io/0.1.11/java-io-0.1.11.pom from s3://datomic-releases-1fc2183a/maven/releases/
{:command-failed "{:op :push}",
 :causes
 ({:message
   "Could not find artifact org.clojure:data.json:jar:0.2.6 in datomic-cloud (s3://datomic-releases-1fc2183a/maven/releases)",
   :class ArtifactResolutionException}
  {:message
   "Could not find artifact org.clojure:data.json:jar:0.2.6 in datomic-cloud (s3://datomic-releases-1fc2183a/maven/releases)",
   :class ArtifactNotFoundException})}

Did I miss an step?

Aside Meta: You could add a new category for ions

That artifact (org.clojure:data.json:jar:0.2.6) is in maven central (not the datomic-cloud repository).

Can you try deleting the .cpcache folder from your project directory and trying again?

Also, what are the contents of your deps.edn file?

Also, have you modified your global clojure CLI properties (i.e. ~/.clojure/deps.edn)?

We’ve identified an issue with the latest release of the Clojure CLI and ion-dev. See the details here: Ion-dev incompatibility with CLI

I suspect this is the cause of your issue.

1 Like

Yes, that was the problem, Thank you!

This is my 1.10.1.458 is my Clojure version.

I downgraded it to …457 and it worked. I suppose the fix would be to add maven central in the deps file.

Newest update to the CLI fixes this issue:

1 Like