Fork me on GitHub
#shadow-cljs
<
2018-02-18
>
wilkerlucio01:02:37

I'm trying to use shadow with deps.edn, but I'm getting this:

wilkerlucio01:02:47

Wilker-Nu:pathom-book wilkerlucio$ shadow-cljs watch book
shadow-cljs - config: /Users/wilkerlucio/Development/pathom-book/shadow-cljs.edn version: 2.1.16
shadow-cljs - starting via "clojure"
Invalid option: -Sdeps

wilkerlucio01:02:53

ideas what's that about?

wilkerlucio01:02:21

I'm getting it should be trying to call -Spath instead?

hlolli01:02:28

I've been spending a lot of time tonigh trying to find out why shadow-cljs release compiles differently on my computer vs on server. I'm useing same node and shadow-cljs versions, its the same git repo. I don't know what I could be missing, what could cause this. Because the error I get from the server I don't get on my computer, and if I copy the server compilation on to my computer, then I get the same error.

hlolli01:02:19

oh I think I see it now, on my computer I has shadow-cljs 2.1.6 the server has 2.1.16, guess my eyes got fooled, going to check that..

hlolli01:02:26

yup confirmed, there's clearly an error that is present in 2.1.16 that is not present in 2.1.6, and reading the error it doesn't look like my code is anywhere there in between

TypeError: Cannot call a class as a function
    at b.a (quill.js:1952)
    at new b (quill.js:5471)
    at b.value (quill.js:5367)
    at b.value (quill.js:6617)
    at new a (quill.js:1111)
    at a.createEditor (mixin.js:13)
    at a.componentDidMount (component.js:202)
    at a.componentDidMount (factory.js:666)
    at commitLifeCycles (react-dom.production.min.js:150)
    at c (react-dom.production.min.js:159)
this does not have to be because of shadow-cljs.. going to investiage

thheller03:02:37

@wilkerlucio -Sdeps should be available. maybe you have an older version where its not?

thheller03:02:43

@hlolli they only thing I can think would be the closure compiler update

thheller03:02:37

you can try shadow-cljs release build --debug to get a more usefull error maybe

hlolli03:02:09

@thheller yes, I gave up. It was successfully compileing, then I updated shadow, it failed, so I wanted to go back to version 2.1.6 and the failure stayed, maybe cacheing, target unclean. Don't know, but I'm ditching react-quill, useing quill straight up.

wilkerlucio03:02:26

@thheller on the spot, updated clj and it's working fine 🙂

thheller03:02:26

could maybe be related to :default?

hlolli03:02:39

maybe, as for every module require I was doing Module/default (which after reading the docs better, is avoidable), except react-quill... ok, going to have one more look at the chilren of the objects returned by importing react-quill...

thheller03:02:52

:default is in a weird situation in some packages because even though they might provide examples as ES6 with default imports

wilkerlucio03:02:53

is it possible to activate extra deps aliases via command line?

thheller03:02:59

they sometimes publish commonjs instead

thheller03:02:51

@wilkerlucio no, only per config :deps {:aliases [:alias ...]}

thheller03:02:03

extra-deps does not make sense to me in a CLJS setting. maybe you have a use-case where it make sense but so far I haven't found one

wilkerlucio03:02:22

I was thinking that shadow could have something like --clj-options -A:more-alias:other

wilkerlucio03:02:36

in my case is more related to extra paths

hlolli03:02:41

yes, maybe shadow could default to :default, probably screws up backwards compatability (and not compatable with rest of cljs I assume, so bad idea)

wilkerlucio03:02:55

I imagine having deploy build with regular settings, but for dev I want to add local source paths to use dev versions

wilkerlucio03:02:45

also there could be situations you want to try building against different lib versions

thheller03:02:56

@hlolli :default isn't in CLJS yet so I could definitely change it. problem is that the node/webpack world handles default exports differently than closure

thheller03:02:04

so I'm totally unsure which way to go

thheller03:02:42

I tried going the closure way but that broke way too many libs so I went with a compromise for now

thheller03:02:19

@wilkerlucio ok, I'll add -A support

hlolli03:02:06

closure is working on a pace like javascript was in 1999... slow 🙂

hlolli03:02:02

specifying the default is bearable enough to wait and see how closure develops

thheller03:02:07

nah the situation is just messy and supporting the mess that is on npm sometimes is not their goal

thheller03:02:22

problem really is that default import/exports didn't exist before ES6

thheller03:02:38

and everyone has a different interpretation about when or how to use them

thheller03:02:51

so every package does something a little different

thheller03:02:56

which is just messy

thheller03:02:07

I think I should just adopt what webpack does

hlolli03:02:23

and requireing from closure, it can't differentiate that it's requireing es6 or cjs?

hlolli03:02:20

yes, it's very messy, all my kudos to the closure developers that are trying to make something stable

thheller03:02:24

problem is that people publish converted ES6 code to npm

thheller03:02:37

ie. code that was ES6 but was converted to common js by babel

thheller03:02:50

closure detects those as commonjs and rewrites them accordingly

thheller03:02:07

BUT that breaks how others require those

thheller03:02:08

so ... mess ..

thheller03:02:43

but thats part of the reason I don't use closure to process anything on npm

hlolli03:02:49

ah, ok I though google closure had some babel functionality behind the hood, since import seemed to be what was running

thheller03:02:23

well I use closure but not their es6/cjs rewriting

thheller03:02:56

if you can tell me which package fails now that worked before I can take a look

hlolli03:02:09

react-quill

thheller03:02:25

and your require for it is?

hlolli03:02:38

Im swimming in a mess, just deleted target and trying again now, then I can test this require

hlolli03:02:59

["react-quill" :as Quill]

thheller03:02:30

see .. super weird package

thheller03:02:51

but [:> Quill ...] should be working?

hlolli03:02:01

that works in 2.1.6

hlolli03:02:46

not 2.1.16, didnt try in between, so I dont know where it fails, well I did try, but as I was down to 2.1.10 I realized I didnt delete target in between of downgrading shadow-cljs 🙂

thheller03:02:37

deleting target directory should never be necessary

thheller03:02:46

cache is smart enough to detect file changes

hlolli03:02:48

I had successful case of deleteing target just 5 mins ago, shadow-cljs was complaining about superfuntion or something, too strange to make sense, so it left after I tortched target.

thheller03:02:20

module.exports = require('./component'); is what you get with :as Quill

thheller03:02:30

but that also has a Quill property

hlolli03:02:47

facepalm haha

thheller03:02:50

but none of that behaviour should have change between the versions

hlolli03:02:15

I can try 2.1.6 again moment

hlolli03:02:38

(not that I want to prove you, but to see if this is irrelevant)

hlolli03:02:45

Im doing the "crunch", so my short term memory and overall demenour is not crisp

thheller03:02:41

I reproduced the error with 2.1.16

hlolli03:02:27

ok, phew, so, I reproduced the success with 2.1.6

thheller03:02:10

I'll see if its the closure version

thheller03:02:26

downgrading ONLY closure fixes it 😞

thheller03:02:23

it might work if you add [com.google.javascript/closure-compiler-unshaded "v20180101"] to your deps

thheller03:02:32

thats the release before their big changes

thheller03:02:44

I'll try to figure out whats different and see if I can do something about that

hlolli03:02:53

ok nice I'll try

thheller03:02:37

oh wait I just tested with [com.google.javascript/closure-compiler-unshaded "v20170910"]. so maybe thats the safe option.

hlolli03:02:20

ok, I'm starting the first one now, let's see, try the other one if it fails

thheller03:02:11

confirmed that v20180101 works

thheller03:02:33

but it prints a bunch of warnings that aren't there with v20170910

hlolli03:02:29

yes it works, but notice a clue here, if you do [:> Quill/Quill] you get the same error as before.

thheller03:02:19

Quill is the react-quill component

thheller03:02:27

Quill/Quill is basically (:require ["quill" :as Quill])

thheller03:02:36

since they just pass that through

hlolli03:02:45

and also printing the object Quill (the :as Quill) then the letter c #object[c], was b. If that could matter

thheller03:02:38

nah thats just the minifier being weird

hlolli04:02:41

thanks so much, here ends 11 hours struggle 😄, these kinds of issues really kill the flow and fun.

hlolli04:02:09

but I've been lucky for long time, it was my turn hehe

thheller04:02:33

yeah these kinds of things are painfully annoying

thheller04:02:07

I'd prefer if it was something I did but I guess its not 😞

thheller04:02:24

easier to debug if its on my end

hlolli04:02:07

thats a good mindset, but yeh, it shows thats closure can sometime do non backwards compatable things.

hlolli04:02:33

in their defence, workings with npm deps, I give them a break on that one

thheller04:02:46

no idea what to do though short of git bisect

hlolli04:02:00

maybe there's some logic to their changes, or this is a bug, it seemed to be the default export was the supposedly nested quill.js object. Could that be symbol bug, maybe we can give this a better try on the newest closure compiler.

thheller04:02:59

no default exports in this code

thheller04:02:26

v20180204 is the latest release

hlolli04:02:33

at least the difference seems to be that what object ["react-quill" :as Quill] becomes, differes between the compiler versions.

thheller04:02:44

pretty sure there is just some extra rewriting happening that wasn't there before

thheller04:02:18

the object still seems to be the same

thheller04:02:26

its still a react component and stuff

thheller04:02:22

the exception happens somewhere deep in Quill code

thheller04:02:26

not even react

hlolli04:02:49

really... it seemes to me that the error message from the older version from [:> Quill/Quill] and [:> Quill] in newer compiler is exacly the same, but I can look better..

thheller04:02:02

Quill/Quill is never the component

thheller04:02:58

I'm logging it before trying to mount it and it look identical between the versions

hlolli04:02:02

my theory goes like that, that in newest closure version ["react-quill" :as Quill] is also not the component

hlolli04:02:21

ok, then.. my theory is wrong 🙂

thheller04:02:42

exports was just my first instinct but it was wrong

thheller05:02:53

bisect this commit is bad

thheller13:02:40

@wilkerlucio -A:foo now supported in 2.1.17

wilkerlucio15:02:22

@thheller after I updated to 2.1.17, trying to compile is generating a lot of those:

wilkerlucio15:02:24

------ WARNING #1 --------------------------------------------------------------
 File: /Users/wilkerlucio/Development/third-part/fulcro/src/main/fulcro/client/primitives.cljc:608:21
--------------------------------------------------------------------------------
 605 |   (if-not (nil? x)
 606 |     #?(:clj  (or (instance? fulcro.client.impl.protocols.IReactComponent x)
 607 |                (satisfies? p/IReactComponent x))
 608 |        :cljs (true? (. x -fulcro$isComponent)))
---------------------------^----------------------------------------------------
 Cannot infer target type in expression (. x -fulcro$isComponent)
--------------------------------------------------------------------------------
 609 |     false))
 610 |
 611 | #?(:clj
 612 |    (defn react-type

thheller15:02:52

I turned externs inference on by default so thats an extern inference warning

wilkerlucio15:02:30

they are too many (140 in my case) the warns are poluting the UI on browser, making unusable =/

wilkerlucio15:02:34

how I disable that?

thheller15:02:53

hmm really so many? I should probably turn it off then

thheller15:02:31

:compiler-options {:infer-externs true} was the previous default

wilkerlucio15:02:39

true was the previous default? what is the default now?

thheller15:02:29

with true you have to (set! *infer-externs* true) to get the warnings

wilkerlucio15:02:30

most of then seem to come related to fulcro code

thheller15:02:41

auto sets that for all FILES on your classpath

thheller15:02:10

it will warn about all native interop where the interop value cannot be identified as js or clj

thheller15:02:28

so yeah lots of interop produces lots of warnings

thheller15:02:57

I'll revert it back to true ... 140 warnings is way too much

wilkerlucio15:02:41

agreed, I just got back to sanity with the compiler option set to true again

thheller15:02:57

its only an issue if you have libraries like fulcro as actual sources

thheller15:02:03

when using a jar it won't warn about those

thheller15:02:26

although at some point everything should probably be annotated properly

wilkerlucio15:02:28

humm, that makes sense, I'm using a bunch of things in dev mode at this point

thheller15:02:35

otherwise externs inference is never gonna catch on

wilkerlucio15:02:27

not sure if @tony.kay is aware about those at this point

thheller15:02:42

trouble is that those probably don't require externs but the compiler can't figure this out on its own

thheller15:02:50

reverted the default in 2.1.18

Jon15:02:44

33 |          (.on socket "message" on-message!)
----------------^---------------------------------------------------------------
 Cannot infer target type in expression (. socket on "message" on-message!)

Jon15:02:01

guess I need to upgrade.

thheller15:02:16

you probably want to typehint socket

thheller15:02:11

but if you didn't have issues so far you can probably either upgrade or disable via config

thheller15:02:25

guess setting the default was a little too ambitious

Jon15:02:12

upgraded and no warnings now

Jon15:02:24

adding ^js also worked.

hlolli16:02:17

again I'm getting strange difference between server and my computer, same shadow-cljs and same closure versions, which I find hard to believe. It's the tab button from material-ui menu, when I click on it, the server greets me with

index.js:19 Uncaught TypeError: Cannot read property 'ease' of undefined
    at Object.left (index.js:19)
    at b.d.scrollSelectedIntoView (Tabs.js:257)
    at b.value (Tabs.js:308)
    at commitLifeCycles (react-dom.production.min.js:150)
    at b (react-dom.production.min.js:159)
    at ka (react-dom.production.min.js:170)
    at t (react-dom.production.min.js:169)
    at p (react-dom.production.min.js:168)
    at m (react-dom.production.min.js:166)
    at Object.enqueueForceUpdate (react-dom.production.min.js:110)
and crashes the root component and leaves the site with only background, typical react crash, investiageing...

theasp16:02:30

Hey, is there something equivalent to lein-ancient?

hlolli16:02:52

nah ok, not the compiler, both the source maps and main js file had the same md5sum

thheller16:02:58

@hlolli is it possible that the server includes some other javascript that might cause conflicts?

thheller16:02:15

google analytics or something similar maybe?

hlolli16:02:35

I've torched the js dir, no its still at this point completly the same, same server handler etc.

hlolli16:02:59

I'm starting to suspect some callback stuff, its way slower connection, the server is in iceland and im in germany

hlolli16:02:43

so typical js headache probably

hlolli17:02:48

ok I guess the md5sum differ, Im getting lost in all those terminal windows of on which computer I am

thheller17:02:41

md5sum can always differ due to the naming scheme by closure

hlolli17:02:13

I guess :whitespace would be deterministic?

thheller17:02:02

I wouldn't count on it. should rather try shadow-cljs release app --debug to get more clues about where you are at in the code

thheller17:02:17

can also try shadow-cljs check app, maybe that has some clues

thheller17:02:27

just pause on exception in chrome and stepping through the code might help as well

thheller17:02:53

Uncaught TypeError: Cannot read property 'ease' of undefined since its named ease I don't think its an externs issue

thheller17:02:03

but maybe somewhere nil is passed where it shouldn't

thheller17:02:16

which npm package is involved? besides react-dom?

thheller17:02:22

this one I guess

hlolli17:02:59

ok, I need coffee, it says on my computer

✗ shadow-cljs release public --debug
shadow-cljs - config: /home/hlolli/Documents/visitor/shadow-cljs.edn version: 2.1.16
...
[:public] Build completed. (1509 files, 1389 compiled, 0 warnings, 48.10s)
oh damn, tmux is not allowing me to select text and copy,

thheller17:02:20

1509 files geez 😛

hlolli17:02:29

but on the server it's 1476 files, should be easy to track, I should have seen this earleir

thheller17:02:02

hmm might be a good old npm non-deterministic install?

hlolli17:02:20

yeh, geez, takes a minute for the browser to load the source maps

thheller17:02:47

hehe I've seen bigger 😉

hlolli17:02:27

I could try yarn

thheller17:02:39

package-lock.json is also a thing for npm if you have that committed

thheller17:02:55

you can also try to compare the generated manifest.edn in the :output-dir

thheller17:02:08

that lists all the included sources

thheller17:02:39

but this scroll does this dynamic things closure is not very fond of

thheller17:02:44

so it may just be that

hlolli17:02:14

ok, yes I should defenitely commit the lockfile, I see now why it makes sense

hlolli17:02:02

let's see what yarn does, maybe I commit that lockfile from yarn and switch over

hlolli17:02:18

🎉sanity! Yarn compiled the exact same amount of files and now I get the bug on my laptop, the same as on the server.

thheller17:02:37

would have been better the other way around 😉

hlolli17:02:23

hehe yeh, I wonder if I was cacheing older react versions, going to give some downgrade a try

hlolli17:02:48

because I think yesterday I downgraded react and upgraded again

hlolli18:02:45

it seems to be bad codeing that this closure only receives 2 arguments out of 4 on call

_scroll2.default.left(_this.tabs, invert * nextScrollLeft);
module.exports = {
  left: make('scrollLeft'),
  top: make('scrollTop')
}
function make (prop) {
return function scroll (el, to, opts, cb) {
    if (typeof opts == 'function') cb = opts, opts = {}
var ease = opts.ease || inOutSine
but the object opts gets set to a default value {}, would guess that just adding var in front of that could fix is. In any case I open an issue.

thheller18:02:46

did you test if the closure version makes a difference?

hlolli18:02:42

I downgraded from v20180101 to v20170910, I try the newest one with yarn quickly...

hlolli18:02:32

well, forget that comment about yarn 🙂 not a npm module

thheller18:02:53

since scroll.js is just a single file you could override what it resolves to

hlolli18:02:40

the latest closure v20180204 didnt fix this, Im surprised how this worked for so long in the first place, only god knows (ergo nobody). But the idea of overriding I'll do anyway

hlolli18:02:46

looks fixable

wilkerlucio18:02:46

just tried to make a release build, but on some cases I'm getting this weird error:

wilkerlucio18:02:47

TypeError: Cannot read property 'log' of null
    at b (main.js:1638)

hlolli18:02:58

@thheller should I use :npm or will :file work too

:js-options {:resolve {"scroll" {:target :file
                                :require "./overrides/scroll_index.js"}}}

thheller18:02:24

:file "overrides/scroll_index.js"

thheller18:02:44

@wilkerlucio shadow-cljs release app --debug should make it easier to find whats null

wilkerlucio18:02:21

thanks, trying

wilkerlucio18:02:36

other thing that worth mention, when I delete the target and try to run shadow commands, I get this:

wilkerlucio18:02:38

shadow-cljs - error ENOENT: no such file or directory, open 'target/shadow-cljs/logging.properties'

wilkerlucio18:02:50

then I have to manually create the target/shadow-cljs back so it works

thheller18:02:30

when does that happen?

wilkerlucio18:02:27

if I delete the target folder

wilkerlucio18:02:37

rm -rf target

thheller18:02:45

which shadow-cljs command

wilkerlucio18:02:02

any of then it seems, but I've been trying with watch

wilkerlucio18:02:14

about the --debug, seems something related to logging

thheller18:02:19

oh with :deps I guess?

wilkerlucio18:02:21

on fulcro, that uses some logging stuff from closure

wilkerlucio18:02:27

yeah, :deps is been used

wilkerlucio18:02:02

fixed the release build, had to add :compiler-options {:closure-defines {goog.LOCALE "en"}}, I remembered reading this earlier here

thheller18:02:35

goog.LOCALE "en" is one of the defaults?

hlolli18:02:51

didnt go trough this is still in the manifest and output "node_modules/scroll/index.js" after :js-options {:resolve {"scroll" {:file "overrides/scroll_index.js"}}}

thheller18:02:35

hehe, must still keep the :target :file

hlolli18:02:06

ah, I tried with target :npm, wasn't sure in which direction the target was aiming 🙂

thheller18:02:26

:npm is configured via :require and :require-min

thheller18:02:35

:file is :file

thheller18:02:49

but :target is necessary to select which key to look at next

hlolli18:02:50

yes, you could theoretically get all that data just from :require vs :file ? no pain to add target whatsoever

thheller18:02:50

:file is a in a weird space right now since the classpath changes I made

thheller18:02:20

but there is also :global 😉

hlolli18:02:37

ah, damn golbals

thheller18:02:18

I prefer to be explicit and not just look at a bunch of keys

hlolli18:02:42

I could learn a thing or two from you on that topic

hlolli19:02:37

now I have these two files nested in release ... target dir

module$overrides$scroll_index.js
module$node_modules$scroll$index.js
and the code requireing scroll/index.js finds neither. Maybe harmless, just wondering if this is affecting the correct true state of the target to compilation.

thheller19:02:12

did you clean the target dir? I don't clean anything

hlolli19:02:25

no, I bet that may help, let's see

thheller19:02:38

nah the extra file doesn't harm anyone

thheller19:02:52

would just be a leftover from a previous compile

thheller19:02:23

the lookup should work though

thheller19:02:57

you can check the modules$node_modules$material_ui$tabs$tabs.js or whatever that was called

thheller19:02:02

if it has the correct require up top

thheller19:02:33

it should but its been a while since I used :file

hlolli19:02:09

var _scroll = require('scroll');
var _scroll2 = _interopRequireDefault(_scroll);
function called from _scroll2 that existed, is now not found

thheller19:02:46

what does the output file look like?

wilkerlucio19:02:58

@thheller not sure what you mean by goog.LOCALE "en" is one of the defaults, defaults of what?

hlolli19:02:21

1 sec.. its loading the source map, takes longer than compileing 😄

thheller19:02:24

and its the default in closure itself, so setting it to en shouldn't really make a difference?

wilkerlucio19:02:33

well, it surely did here

wilkerlucio19:02:23

was a random attempt, I just remembered you saying something about it here, I tried and worked 😛

hlolli19:02:48

aw_yeah haha no "output" to show, deleted target, compiled again and now I can scroll like a m***fa*a

thheller19:02:27

and what did you change?

hlolli19:02:32

this bast*rd opts = opts || {}; cured it haha, wow

hlolli19:02:13

this feature of patcheing/overriding the npm modules, is very very important. Going to implement this into the lumo binary bundler I made recently. Since requireing .node files needs always some patcheing, not counteing fixing bugs.

thheller19:02:45

doesn't work in node though

thheller19:02:13

that just delegates to require. can't influence what that does.

hlolli19:02:14

I mean implementing this concept, in js.

thheller19:02:27

for :browser I control entirely how and what gets resolved

thheller19:02:48

webpack has something similar, thats where I got the idea

hlolli19:02:29

yeh, nexe has this concept of monkeypatching, I was already on the path of seeing the importance of this.

hlolli19:02:31

this at least time from creating a fork, and aim npm modules to a github repo, which is the classical way I guess.

thheller19:02:14

yeah :resolve {"scroll" {:target :npm :require "@hlolli/scroll"}} would have been the alternative

thheller19:02:48

but also wouldn't have any effect in node

hlolli19:02:24

because of the non-advanced optimizations?

thheller19:02:47

no because you don't require it. material-ui does.

thheller19:02:10

so we do only require("material-ui") and whatever that does we have no control over

hlolli19:02:45

hm ok, never had to try stunt like that so far, editing nested dependencies in npm

thheller19:02:59

works in webpack but not in node

thheller19:02:53

I'm always amazed what closure does with the code

thheller19:02:00

its a wonder anything works at all

thheller19:02:49

doesn't look anything like the input 😛

hlolli19:02:11

you can say closure is very foriging of the quality of the code it receives 🙂

hlolli19:02:03

no Im blameing the wrong victim here, this code is fine, mostly, just Tabs.js that was not filling in all the parameters

thheller19:02:42

that would have fixed the issue as well

thheller19:02:58

just disable the closure processing of scroll

hlolli19:02:55

Im glad I was able to fix it, but the cost of time chaseing these errors probably outweigh the benefit. Sounds reasonable to do this.

mhuebert19:02:41

hmm, i’m setting up shadow-cljs in a new blank project and getting

shadow-cljs - error ENOENT: no such file or directory, open 'target/shadow-cljs/logging.properties'
did some backtracking, and looks like this happens for every version 2.0.143 to present

thheller19:02:02

just fixed that

mhuebert19:02:46

for the next release?

thheller19:02:17

yeah building now

mhuebert19:02:23

👍:skin-tone-2:

thheller20:02:36

hmm build failed

thheller20:02:40

dunno why yet

mhuebert20:02:11

hmm, getting

mhuebert20:02:14

npx shadow-cljs server
shadow-cljs - error $CLJS.Pg.resolve is not a function

thheller20:02:43

that was the error I fixed

thheller20:02:46

but I didn't recompile

thheller20:02:00

2.1.20 should work

mhuebert22:02:49

hmm,

mattpro:re-style MattPro$ npx shadow-cljs server
shadow-cljs - config: /Users/MattPro/Documents/sites2017/re-view/re-style/shadow-cljs.edn version: 2.1.20
shadow-cljs - error ENOENT: no such file or directory, open 'target/shadow-cljs/logging.properties'

wilkerlucio22:02:15

I'm still seeing that too

thheller22:02:28

does the path exist?

wilkerlucio22:02:28

@mhuebert as a workaround, just mkdir -p target/shadow-cljs

wilkerlucio22:02:31

@thheller I'm just starting trying to create the react native app, but got an error that I didn't see before:

wilkerlucio22:02:32

[:app] Configuring build.
[:app] Compiling ...
[:app] Build failure:
cannot find package.json for package react at /Users/wilkerlucio/Development/personal/multi-timer/node_modules/react/package.json
{:tag :shadow.build.npm/missing-package-json, :package-name "react", :package-json-file #object[java.io.File 0x55bcd296 "/Users/wilkerlucio/Development/personal/multi-timer/node_modules/react/package.json"]}
ExceptionInfo: cannot find package.json for package react at /Users/wilkerlucio/Development/personal/multi-timer/node_modules/react/package.json
	clojure.core/ex-info (core.clj:4739)
	clojure.core/ex-info (core.clj:4739)
	shadow.build.npm/find-package* (npm.clj:126)
	shadow.build.npm/find-package* (npm.clj:108)
	shadow.build.npm/find-package (npm.clj:137)
	shadow.build.npm/find-package (npm.clj:133)
	shadow.build.resolve/eval20329/fn--20332 (resolve.clj:210)
	clojure.lang.MultiFn.invoke (MultiFn.java:238)

wilkerlucio22:02:38

you know what to do about this one?

thheller22:02:38

/Users/wilkerlucio/Development/personal/multi-timer/node_modules/react does it exist?

thheller22:02:07

is it empty maybe? I think that happened to me before

wilkerlucio22:02:17

humm. looks like it

thheller22:02:35

when in doubt rm -rf node_modules && npm install

wilkerlucio22:02:38

I saw that before in another react native apps, there is something wrong with npm resolution

wilkerlucio22:02:59

on the other project it works it used to work if you keep running npm install

thheller22:02:23

I'm no stranger to just resetting the folder and start from scratch

thheller22:02:36

also I use mostly yarn these days which seems a bit more reliable

mhuebert22:02:08

@wilkerlucio thanks, a workaround is less important than figuring out how to get this fixed so that I don’t have to add an extra instruction to all my READMEs 🙂

wilkerlucio22:02:01

agreed, but sometimes we just need to get going 🙂

thheller22:02:08

@mhuebert when you kill the server, rm -rf target/shadow-cljs and start the server again. does the target/shadow-cljs folder exist at least?

thheller22:02:35

its supposed to create that first and then write the logging.properties into that

wilkerlucio22:02:52

@thheller just tried that here, it doesn't seem to be creating it

thheller22:02:17

what the heck

thheller22:02:32

tried it on windows and wsl linux

thheller22:02:42

will try on mac

wilkerlucio22:02:51

I'm on mac here

mhuebert22:02:13

npx shadow-cljs stop said that there was no server running, but then afterwards it worked

mhuebert22:02:51

oh i see, the directory is actually created when I run npx shadow-cljs stop

thheller22:02:28

do you use :lein or :deps?

mhuebert22:02:29

but npx shadow-cljs server does not create the directory

mhuebert22:02:35

trying it for the first time

thheller22:02:11

if you just create the directory it works though?

thheller22:02:19

not the file, only the directory?

thheller22:02:27

I used mkdirp not mkdirp/sync ...

thheller22:02:30

thats probably it

thheller22:02:00

I didn't test with :deps

thheller23:02:38

I'm done for the day. gn8.