funcool / cuerdas

String manipulation library for Clojure(Script)
https://cljdoc.org/d/funcool/cuerdas/2020.03.26-3/
BSD 2-Clause "Simplified" License
304 stars 30 forks source link

Namespace cuerdas.vendor.xregexp not found #54

Closed kiemdoder closed 7 years ago

kiemdoder commented 7 years ago

When I try to require [cuerdas.core :as str] I get the following error: No such namespace: cuerdas.vendor.xregexp, could not locate cuerdas/vendor/xregexp.cljs, cuerdas/vendor/xregexp.cljc, or Closure namespace "cuerdas.vendor.xregexp" in file file:/home/z/.m2/repository/funcool/cuerdas/2.0.3/cuerdas-2.0.3.jar!/cuerdas/regexp.cljc

niwinz commented 7 years ago

Some test case to reproduce that?

alexandergunnarson commented 5 years ago

I'm getting this same error when trying to run Figwheel. All I'm doing is adding the latest version (2.1.0) of Cuerdas to the dependencies and trying to run it like so (via clojure -R:figwheel -m figwheel.main -b dev -r):

deps.edn

{:paths ["src"],
 :deps
 {funcool/cuerdas {:mvn/version "2.1.0"},},
 :aliases
 {:dev {:extra-paths ["src-dev" "compiled/dev"]},
  :figwheel
  {:extra-deps
   {com.bhauman/figwheel-main {:mvn/version "0.2.0"},
    com.bhauman/rebel-readline-cljs {:mvn/version "0.1.4"}}}}}

And then running terminal command:

bash-3.2$ clojure -R:figwheel -m figwheel.main -b dev -r
2019-01-25 11:03:14.077:INFO::main: Logging initialized @7272ms
[Figwheel:WARNING] Attempting to dynamically add "compiled/dev" to classpath!
[Figwheel:WARNING] Target directory "compiled/dev" is not on the classpath
[Figwheel:WARNING] Please fix this by adding "compiled/dev" to your classpath
 I.E.
 For Clojure CLI Tools in your deps.edn file:
    ensure "compiled/dev" is in your :paths key

 For Leiningen in your project.clj:
   add it to the :resource-paths key
[Figwheel] Compiling build dev to "compiled/dev/public/js/main.js"
[Figwheel] Failed to compile build dev in 8.058 seconds.
[Figwheel:WARNING] Compile Exception   compiled/dev/public/js/compiled/cuerdas/regexp.cljc   line:28  column:23

  No such namespace: xregexp, could not locate xregexp.cljs, xregexp.cljc, or JavaScript source providing "xregexp" in file compiled/dev/public/js/compiled/cuerdas/regexp.cljc

  23  ;; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  24
  25  (ns cuerdas.regexp
  26    "A regexp helpers and enhancements (mostly for cljs)."
  27    (:refer-clojure :exclude [regexp?])
  28    #?(:cljs (:require [xregexp]
                            ^---
  29                       [goog.string :as gstr]))
  30    #?(:clj (:import (java.util.regex Pattern))))
  31
  32  (defn regexp?
  33    "Return `true` if `x` is a regexp pattern

[Figwheel:SEVERE] clojure.lang.ExceptionInfo: No such namespace: xregexp, could not locate xregexp.cljs, xregexp.cljc, or JavaScript source providing "xregexp" in file compiled/dev/public/js/compiled/cuerdas/regexp.cljc
[Figwheel] Starting Server at http://localhost:9500
[Figwheel] Starting REPL
Prompt will show when REPL connects to evaluation environment (i.e. a REPL hosting webpage)
Figwheel Main Controls:
          (figwheel.main/stop-builds id ...)  ;; stops Figwheel autobuilder for ids
          (figwheel.main/start-builds id ...) ;; starts autobuilder focused on ids
          (figwheel.main/reset)               ;; stops, cleans, reloads config, and starts autobuilder
          (figwheel.main/build-once id ...)   ;; builds source one time
          (figwheel.main/clean id ...)        ;; deletes compiled cljs target files
          (figwheel.main/status)              ;; displays current state of system
Figwheel REPL Controls:
          (figwheel.repl/conns)               ;; displays the current connections
          (figwheel.repl/focus session-name)  ;; choose which session name to focus on
In the cljs.user ns, controls can be called without ns ie. (conns) instead of (figwheel.repl/conns)
    Docs: (doc function-name-here)
    Exit: :cljs/quit
 Results: Stored in vars *1, *2, *3, *e holds last exception object
[Rebel readline] Type :repl/help for online help info
Opening URL http://localhost:9500

Possibly this is related to the compiled/dev path issue but I doubt it.