Fork me on GitHub
#figwheel-main
<
2019-12-07
>
Philipp Siegmantel07:12:30

Hello, I have a problem with an npm dependency. I followed the tutorial and from what I can see, I have a valid index.bundle.js file in the right location. I tried the explicit :foreign-libs and the automatic :npm method. The first gives me an IOException saying the file could not be found, the latter says Could not Find Namespace. My :npm config is

^{:npm {:bundles {"resources/public/js/index.bundle.js" "src/js/index.js"}}}
and :foreign-libs
:foreign-libs [{:file "resources/public/js/index.bundle.js"
                :provides ["pitchfinder"]
                :global-exports {pitchfinder PitchFinder}}
Obviously I'm making a very obvious, stupid mistake, but I'm too blind to see it.

Philipp Siegmantel10:12:51

I figured it out. Needed to use import rather than require.

Philipp Siegmantel10:12:58

I correct myself, I din't solve it, the error message just disappeared. Now it only shows in the repl window.