Fork me on GitHub
#lein-figwheel
<
2018-06-20
>
tungsten18:06:57

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/

bhauman22:06:35

@bfast this is a good question

bhauman22:06:10

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.

bhauman22:06:58

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

bhauman23:06:34

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

tungsten23:06:58

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

bhauman23:06:21

@bfast yeah its not in the plugin

bhauman23:06:49

oh I get what you're saying

bhauman23:06:08

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

bhauman23:06:19

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

bhauman23:06:32

not your fault

bhauman23:06:00

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

bhauman23:06:50

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

tungsten23:06:03

thats definitely a sharp edge....

tungsten23:06:18

Thanks again for looking into this

bhauman23:06:10

yeah the problem is that the project root gets watched

bhauman23:06:45

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

bhauman23:06:50

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

bhauman23:06:12

but the error sucks

tungsten23:06:15

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

tungsten23:06:37

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

bhauman23:06:33

@bfast actually its still not working

bhauman23:06:20

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

bhauman23:06:10

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

tungsten23:06:27

yeah that was what was really baffling me

bhauman23:06:03

it makes no sense whatsoever

tungsten23:06:26

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

tungsten23:06:32

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

tungsten23:06:12

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