Open lgrapenthin opened 6 years ago
The ClojureScript compiler fails with a pretty mysterious error when it is provided a directory to compile that has no source files in it, I added this protection so that you know why. If you don't want to get this error then don't provide watch directories that have no source files in them.
If you are getting this error in a situation where you are not providing an empty directory as a watch directory please let me know.
This would really need to be fixed in the compiler.
Actually I had to dig through the source code to understand that I got the error because of an empty folder.
The error message was not helpful in this case and would certainly misdirect a non-expert user. It said nothing about an empty folder or clj* files being required in a folder.
If this is a CLJS compiler bug/GIGO situation I'd prefer figwheel not to interfere or warn at most. Iac it would be helpful if the error message got improved.
Actually, I don't know what error you received.
Did you get a spec error?
The CLJS compiler error is just an NPE when trying to read the source.
It showed me the watch-dirs vector and highlighted the empty folder, mentioned the ::watch-dirs spec but didn't mention its emptiness being the problem.
When setting up new projects I set up folders like for cljc that are empty when I start figwheel. Would be nice if they were made possible.