Fork me on GitHub
#clojurescript
<
2017-08-12
>
tiagoantao00:08:26

@anmonteiro I think I have finally found a problem that is probably related to Google Closure. In the code on https://github.com/tiagoantao/stats I have the code isolated. I do not need this for now, but I am trying to check if libraries of scientific interest can work with ClojureScript (and do whatever I can so that they are supported) - so I am willing to do whatever changes and tests are needed to make this work in the long run. The error is something of the form Uncaught TypeError: module$home$tiago_antao$stats$node_modules$vega_lite$build$src$config.initConfig is not a function (it is defined as a function by vega-lite). Of course, the alternative is that I a making a silly mistake again 馃槥

Oliver George10:08:12

I've hit a snag experimenting with :npm-deps {"@blueprintjs.core" "1.24.0"}

Oliver George10:08:49

The build fails with this error

WARNING: JSC_JS_MODULE_LOAD_WARNING. Failed to load module "tslib" at /Users/olivergeorge/repos/labs-grid/node_modules/@blueprintjs/core/dist/common/abstractComponent.js line 10 : 4

Oliver George10:08:27

It seems to have trouble with the require("tslib") line near the top of this file: https://unpkg.com/@blueprintjs/[email protected]/dist/common/abstractComponent.js

Oliver George10:08:27

I don't get any errors building with :npm-deps {:tslib "1.7.1"} (first thought was that tslib was causing the problem or not being fetched but I can't see evidence to support that)

Oliver George10:08:59

Currently I'm using clojurescript/master

Oliver George10:08:43

The full build command is

(b/build
    "src"
    {:output-dir    "out"
     :output-to     "out/labs_grid.js"
     :main          'labs-grid.core
     :verbose       true
     :install-deps  true
     :npm-deps      {:react "15.6.1"
                     :react-dom "15.6.1"
                     :react-addons-css-transition-group "15.5.1"
                     "@blueprintjs/core" "1.24.0"}
     })

lvh17:08:54

How do people run tetss for clojurescript projects targeting node? the popular option seems doo, but I was hoping to use a simple runner script like the repl script and build script used in the tutorial.

anmonteiro18:08:29

particularly the part where I define the multimethod for [:cljs.test/default :end-run-tests]

lvh18:08:32

@anmonteiro How do you run that though? Build and then run with node?

anmonteiro18:08:01

you can actually pack those 2 files into one

Aron20:08:38

if i require a module from npm with :npm-deps that uses something like fs or other node api that for example is shimmed by browserify, how can i apply the shim (or equivalent solution)?