Welcome! Please see the About page for a little more info on how this works.

0 votes
in Syntax and reader by
edited by

It's happen when i load the huqsql namespace into nREPL and then the error is appears to be something like this :

Syntax error (FileNotFoundException) compiling at (src/db_examples/hugsql.clj:1:1).
Could not locate hugsql/core__init.class, hugsql/core.clj or hugsql/core.cljc on classpath.

dependencies :

[[org.clojure/clojure "1.10.1"]
             [seancorfield/next.jdbc "1.1.613"]
             [org.postgresql/postgresql "42.2.8"]
             [com.layerware/hugsql "0.5.3"]
             [hugsql-next-jdbc "0.1.3"]]

the namespace :

(ns db-examples.hugsql

(:require [db-examples.core :refer [db]]
            [next.jdbc :as jdbc]
            [hugsql.core :as hugsql]))

(hugsql/def-db-fns "resources/users.sql")

1 Answer

0 votes
by

Oh i'm sorry i think i've already get the solution. After i restart the nREPL, eveything is running normaly.
But need to change some of the code.

From

(hugsql/def-db-fns "resources/users.sql")

to

(hugsql/def-db-fns "users.sql")
...