This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-04-15
Channels
- # announcements (10)
- # beginners (113)
- # calva (2)
- # cider (75)
- # clj-kondo (1)
- # cljdoc (2)
- # clojure (142)
- # clojure-europe (11)
- # clojure-gamedev (6)
- # clojure-italy (7)
- # clojure-nl (8)
- # clojure-spec (3)
- # clojure-uk (50)
- # clojurescript (47)
- # cursive (7)
- # data-science (22)
- # datomic (12)
- # dirac (3)
- # events (1)
- # fulcro (114)
- # gorilla (1)
- # jackdaw (5)
- # joker (3)
- # kaocha (10)
- # leiningen (1)
- # liberator (2)
- # mount (6)
- # nrepl (1)
- # off-topic (16)
- # pathom (34)
- # pedestal (3)
- # re-frame (19)
- # reagent (11)
- # remote-jobs (5)
- # shadow-cljs (127)
- # spacemacs (12)
- # test-check (15)
- # tools-deps (8)
- # vim (4)
Heya, I have a problem using react-swipeable-views
with shadow-cljs. When I go with yarn add react-swipeable-views
it fails on the app start, giving me could not find module-entry: @babel/runtime/helpers/builtin/interopRequireDefault
- most probably because that’s ES6 module. @thheller any clue on this one? I don’t want to use cljsjs lib for that.
ES6 modules have not been supported in the past, has that changed recently?
@piczmar.rss that is most likely caused by a dependecy conflict. es6 modules are supported just fine.
@babel/runtime
and which one is installed in node_modules/@babel/runtime/package.json
@marcinszyszko I think its just the usual npm nonsense. the file node_modules/@babel/runtime/helpers/builtin/interopRequireDefault.js
does not exist
node_modules/@babel/runtime/helpers/interopRequireDefault.js
does, so just without the builtin
path. guess the path changed somewhere
@thheller could you help me with one thing that I did not understand well I'd like to build single :node-script that could be run without node_modules. I set {:js-provider :closure} but how to resolve built-in nodejs modules? like "fs" or "crypto"?
@maxp that is currently experimental. see https://github.com/thheller/shadow-cljs/issues/290
is there something like lein-ancient for shadow-cljs to check the project dependancies need to be updated?
@thheller thank you very much. But I had to install bufferutil and utf-8-validate - that stuff used in try { require(...) } ... no workaround here?
there is such code in node_modeuls/ws/lib/BufferUtil.js
`try {
const bufferUtil = require('bufferutil');
module.exports = Object.assign({ concat }, bufferUtil.BufferUtil || bufferUtil);
} catch (e) / istanbul ignore next / {
oh right during development .. you probably want to add :keep-as-require #{"ws"}
for development
@thheller could you please explain to me how to add plain javascript file to the project build (not npm module).
if some one interested in building 'single executable js' there is working example - https://github.com/maxp/rss2tlg
@thheller I’m trying to run shadow with lein profiles, but running into problems. When you use lien with profiles do I need to add shadow in lein dependencies? also even if I do that I still run into issues.
so if anything has a dependency on clojurescript and thus closure-compiler it'll be picked
should be fixed by adding these deps
[org.clojure/clojurescript "1.10.520"]
[com.google.javascript/closure-compiler-unshaded "v20190325"]
[org.clojure/google-closure-library "0.0-20190213-2033d5d9"]
I’m not running the lein command, I’m running shadow-cljs just using lein with a profile to pull dependencies and paths (it’s really just for dependencies)
The documentation says: “When executing directly via lein you must manually include the thheller/shadow-cljs artifact in your :dependencies. This is automatically added when launching via shadow-cljs.”
but I’m not doing that, so I found it a bit confusing that I needed to include shadow in the lien dependencies
Since we’re using lein ancient to check for updates, I didn’t want to rewrite it for shadow
So I thought I’d just put the client deps in the lein profile and pull them from there with shadow lein config
but it'll also run update-in [:dependencies] conj shadow-cljs
or whatever the exact thing is
I still get: java.io.FileNotFoundException: Could not locate shadow/cljs/devtools/cli__init.class,
Might be good to think about plugin architecture so we can build stuff like lein ancient and the likes
well it’s not really a plugin, just need access to shadow-cljs to read the dependencies key
I have http-port and http-root in test build target but it seem to apply also when I watch app build target
since otherwise the HTTP server wouldn't be available if you used shadow-cljs compile foo
while the server instance is running
@thheller got it. Thanks for being super responsive, the clojure community needs more people like you.
The Clojure community also needs more people who allow people like Thomas to spend more time on their projects 🙂 http://patreon.com/thheller
Anybody know what to do when the (I’m guessing closure) compiler returns something like
Closure compilation failed with 1 errors
--- node_modules/vega-lite/build/vega-lite.js:8535
This code cannot be converted from ES6. extending native class: Array
I was trying to use Oz, and I think I was managing to install the (cljsjs) dependencies correctly (npm install vega-lite and then creating the namespace (
(ns cljsjs.vega-lite
(:require ["vega-lite" :as vega-lite]))
(js/goog.exportSymbol "VegaLite" vega-lite)
), I’m not sure where to start.@hobosarefriends maybe :compiler-options {:output-feature-set :es6}
fixes it?
@hobosarefriends try :output-feature-set
instead, should be more reliable
Is there a way to require a specific version of an npm package?
(according to the package-lock I do seem to have both versions) in the namespace? (like :require ["[email protected]" :as vega-tooltip]