Fork me on GitHub
#clojurescript
<
2019-02-18
>
gekkostate07:02:17

Hi everyone! Any recommended Electron libraries for Clojurescript? I’m thinking about: https://github.com/Gonzih/cljs-electron

jkida16:02:01

Hi first day playing with clojurescript. I am trying to load a canvas library konva using :npm-deps.. if i try to require the package it errors with base.js:1357 Uncaught Error: Undefined nameToPath for konva

jkida16:02:17

however.. if i use a different library like moment it seems to work fine.. What am i missing?

roman01la16:02:48

@jdkida npm-deps is alpha quality, it doesn’t handle every possible JS modules format, not recommended to use

roman01la16:02:21

if you want interop with NPM consider shadow-cljs as a build tool

jkida16:02:22

ok, what do you recommend for using third party libs from npm?

borkdude16:02:17

@jdkida I think they recommend this nowadays: https://clojurescript.org/guides/webpack if you want to use deps from NPM.

5
mhuebert23:02:06

hm. I’m trying to use the goog.reflect namespace in a macro, using the common 2-namespaces method where I have a cljs file that requires a clj file which contains macros, and the cljs file requires all the namespaces used by the macros, including goog-reflect. However, I am getting compile warnings,

WARNING: No such namespace: goog.reflect, could not locate goog/reflect.cljs, goog/reflect.cljc, or JavaScript source providing "goog.reflect" at line 4 /projects/cljs-test/src/reflect/other.cljs
WARNING: Use of undeclared Var goog.reflect/objectProperty at line 4 /projects/cljs-test/src/reflect/other.cljs
I have double-checked that goog.reflect is required where it’s supposed to, and verified that if I swap out goog.reflect for goog.object and keep everything else the same, I don’t get warnings… so it seems like this is something specific to goog.reflect. Minimal repro: https://github.com/mhuebert/cljs-goog-reflect

mhuebert00:02:53

FWIW I can avoid the warnings by using js/goog.reflect.getProperty instead