Closed okilimnik closed 7 years ago
I have been testing the same way as you but I've stumbled upon :npm-deps
not working on Windows because it couldn't call npm
properly. On Ubuntu it works well, it installs the dependencies through npm
automatically but I have the same problem with moment not being a function in my tests.
AFAIK this is a ClojureScript issue only figwheel just passes compiler options forward to ClojureScript.
I start figwheel and it doesn't work. But I run "lein clean; lein cljsbuild once dev;" it is working. There is nothing special in profile. It's strange.
I had a similar issue and it got resolved by manually deleting ´resources/public/js/compiled´ and then running figwheel again.
I am shocked. I spent 3 hours trying to troubleshoot :npm-deps not working (typical message: Uncaught Error: Undefined nameToPath for {{package-name}}
. Manually deleting resources/public/js/compiled
as @wnr suggested fixed it for me!
Great that it worked out for you. Here are some extra actions that may help with similar issues (for future readers):
node.js
version.npm install
manuallyRan into this as well in a project when switching branches. lein clean
fixes it.
I'll copy it from slack:
okilimnik [11:11 AM] I can not require moment from npm-depth: $moment is not a function. Clojurescript 1.9.671
Could be it's just a react native issue but I don't understand how it can differ from simple cljs dependencies which just works I've tried lein prod-build and all is working! Seems like it is a figwheel issue
I use [lein-figwheel "0.5.11"]
compiler options:
Could be you should update clojurescript version in order to use a new build api to compile npm dependencies?