hello hello. I was looking into updating the cljsjs package for slate
. Problem: the project now is split into several internal packages (see https://github.com/ianstormtaylor/slate/tree/master/packages). What is the idiomatic way of handling that case (if there is one)?
to expand: shall I provide several externs file in the same package (would that even work?) or create multiple packages…
judging by the treatment of the babel
packages I’d say the latter
Did anyone had issues with react-select (or classnames) package? I got some trouble described here: https://github.com/cljsjs/packages/issues/1418
@olegakbarov
When I do a lein deps :tree
with cljsjs/react-select
as a dep, I get:
[cljsjs/react-select "1.0.0-rc.10-1"]
[cljsjs/classnames "2.2.3-0"]
[cljsjs/react-input-autosize "2.0.0-1"]
Which version are you referring to?
Notice that [cljsjs/classnames "2.2.3-0"]
is a transitive dep here - as expected
i use boot, are there’re equivalent command?
https://github.com/boot-clj/boot/wiki/Boot-for-Leiningen-Users#lein-deps-tree
looks like it
boot show -d
hmm
i got this [cljsjs/react-select “1.0.0-rc.10-1” :exclusions [[cljsjs.classnames]]]
lemme remove :exclusions and see…
yeah, seems it is being excluded…
i removed exclusion, but boot show -d
has same output
are there any way to “clean cache” or smth?
I don’t know about that
I haven’t used boot much
disregard this 🙂
got this now:
[cljsjs/react-select "1.0.0-rc.10-1"]
├── [cljsjs/classnames "2.2.3-0"]
├── [cljsjs/prop-types "15.5.10-1"]
└── [cljsjs/react-input-autosize "2.0.0-1"]
nope… still same error
@olegakbarov You should have the dep available now. maybe you’re caching or something.
@mikerod i tried all possible combinations, but without luck
using the browser can you try to pinpoint where the JS error is occurring?
I use the js debugger sometimes to find the “error” place
it highlights it in Chrome dev tools
Also, see if you see the class names JS in sources there
yeah, sure — the error is in Select package
var className = classNames(‘Select’, this.props.className, {
‘Select--multi’: this.props.multi,
‘Select--single’: !this.props.multi,
‘is-clearable’: this.props.clearable,
‘is-disabled’: this.props.disabled,
‘is-focused’: this.state.isFocused,
‘is-loading’: this.props.isLoading,
‘is-open’: isOpen,
‘is-pseudo-focused’: this.state.isPseudoFocused,
‘is-searchable’: this.props.searchable,
‘has-value’: valueArray.length
});
with classNames defined as:
classNames = classNames && classNames.hasOwnProperty('default') ? classNames['default'] : classNames;
when paused in debugger, classNames is undefined
also, when i require classNames from node_modules and set it as global variable — it do not work either
(def cn
(js/require "classNames"))
(aset js/window "classNames" cn)
im not sure how does require
’ing works in cljsjs, but pretty sure the error might be somewhere in that realm
hmm I don’t see anything obvious still then
I use this [cljsjs/react-select "1.0.0-rc.10-1"]
without a problem
and I don’t have anything with cljsjs/classnames
giving trouble. In both REPL and an :advanced
optimized build. I’ve only used with lein though. Not sure what may be happening in your setup