lein-figwheel

2018-06-20T18:45:57.000424Z

I'm puzzled by why this project doesn't run with figwheel https://github.com/briangorman/es6test Does anyone have any idea? The es6 module I am trying to use works in this project: https://bitbucket.org/briangorman2/broken-cljs/src/master/

bhauman 2018-06-20T22:40:35.000017Z

@bfast this is a good question

bhauman 2018-06-20T22:44:10.000104Z

I'm checking it out and I can't see any reason why yet. First I'm checking to see that the :npm-deps false param is making to the compiler.

bhauman 2018-06-20T22:56:58.000017Z

well :npm-deps false is making it to the compiler

bhauman 2018-06-20T23:06:34.000054Z

hmm it actually looks like its getting built successfully, not sure why it is throwing

2018-06-20T23:24:58.000185Z

Thanks @bhauman, this is much appreciated. I really need to learn how to debug lein plugins

bhauman 2018-06-20T23:25:21.000119Z

@bfast yeah its not in the plugin

bhauman 2018-06-20T23:25:49.000383Z

oh I get what you're saying

bhauman 2018-06-20T23:26:08.000015Z

I'm about to find part of the problem, it is compiling just fine

bhauman 2018-06-20T23:28:19.000195Z

@bfast oh geez your problem is that index.js is in the root directory 😞

bhauman 2018-06-20T23:28:32.000144Z

not your fault

bhauman 2018-06-20T23:29:00.000167Z

@bfast if you put index.js in a subdirectory that will be better

bhauman 2018-06-20T23:29:50.000251Z

figwheel tries to watch your foreign-libs for changes but this is problematic when they are in the root directory

2018-06-20T23:30:43.000049Z

oh man

2018-06-20T23:32:03.000227Z

thats definitely a sharp edge....

2018-06-20T23:32:18.000299Z

Thanks again for looking into this

bhauman 2018-06-20T23:33:10.000032Z

yeah the problem is that the project root gets watched

bhauman 2018-06-20T23:33:45.000291Z

but if you put it in a subdir you can change the es6 file and it will get hot reloaded

bhauman 2018-06-20T23:34:50.000093Z

its expected that cljs source files are in subdirectories, I don't think its a bad rule for other source files

bhauman 2018-06-20T23:37:12.000065Z

but the error sucks

2018-06-20T23:37:15.000089Z

yeah definitely not a bad rule... just a very confusing error

2018-06-20T23:37:37.000226Z

i guess it would be possible to parse the edn for foreign libs and then parse the path to the js

bhauman 2018-06-20T23:38:33.000060Z

@bfast actually its still not working

bhauman 2018-06-20T23:39:20.000150Z

@bfast actually figwheel.main is the way to go here anyway

bhauman 2018-06-20T23:41:10.000301Z

OK with a clean it works and compiles but I keep getting a bunch of Error: Cannot find module '@cljs-oss/module-deps' errors

2018-06-20T23:41:27.000260Z

yeah that was what was really baffling me

bhauman 2018-06-20T23:43:03.000386Z

it makes no sense whatsoever

2018-06-20T23:43:26.000167Z

I got this same error in my other project I linked to

2018-06-20T23:43:32.000182Z

when I didn't pass the -c option to cljs.main

2018-06-20T23:50:12.000238Z

I have to step out for a bit but I'll check back later