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

0 votes
in ClojureScript by
:libs compilation option doesn't work. Whether specifying directories, or specific files. If trying to `import` one of the js classes (properly namespaced with `goog.provide`) into clojurescript, compilation fails with "no such namespace". If the libs code is not referenced in clojurescript, it compiles, and the output directory does not contain the libs js files.

Compilation options:

(cljs.closure/build
    "src/main/clojurescript"
    {:main 'example.core
     :libs ["/src/main/javascript/"]
     :optimizations :none
     :output-dir "js"
     :output-to "js/main.js"
     :source-map true
     :asset-path "/js"
     })


Javascript file:

goog.provide("test.Test");

test.Test = function(x) {
  this.x = x;
};

5 Answers

0 votes
by

Comment made by: mfikes

Hi Dominykas, is the absolute path intentional? I suspect the intent was to not have the leading {{/}}.

0 votes
by

Comment made by: dmos

I made this typo when posting. On my setup paths are relative to project root.

0 votes
by

Comment made by: dnolen

As far as I know quite a few people rely on this functionality. Please provide a complete minimal example or this issue will be closed. All source should be in the ticket or in this comment thread, no external links. Thanks.

0 votes
by

Comment made by: dmos

Can't reproduce. Tips would be appreciated. Banging my head against the wall here.

0 votes
by
Reference: https://clojure.atlassian.net/browse/CLJS-1559 (reported by alex+import)
...