-
-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The required namespace "devcards-marked" is not available, it was required by "devcards/util/markdown.cljs". #168
Comments
In shadow-cljs you can fix this by redirecting the requires back to the original npm package names. In your build config
@bhauman not sure why you moved away from using the regular CLJSJS deps? |
I can confirm that adding
Thanks for the input @thheller! |
Runtime execution proper will still fail with the following message:
This seems to happen because of these configuration items: Lines 1 to 12 in 65caa84
@bhauman would you be receptive to using CLJSJS deps for |
I guess the usual CLJSJS compatibility method can also be used here. Similar to https://github.com/thheller/shadow-cljsjs/blob/master/src/main/cljsjs/marked.cljs |
I managed to make it work with this trick:
Thanks to a slack message from @thheller about aliasing the namespace. And also defining
|
For those like me that had to look up / figure out what mutatis mutandis for cljsjs.highlight meant one had to do:
I ended up adding the file @davidpham87 showed for
|
There is slightly less boilerplated way to achieve this relying on the shadow-cljsjs namespaces that should already be available to you, you can add just those devcards specific symbols to your main devcards namespace like so: (ns devcards.main
(:require [devcards.core :as devcards]
["highlight.js" :as hljs]
["marked" :as marked]))
(js/goog.exportSymbol "DevcardsMarked" marked)
(js/goog.exportSymbol "DevcardSyntaxHighlighter" hljs) Note: you will still need to make "devcards-marked" and "devcards-syntax-highlighter" available to the devcards code using the :resolve or :ns-alias options described above. |
Note that to use the latest version of marked, you have to do |
Affirmative. From at least |
I created a modified version of |
Hi there 👋
I was trying to use
[devcards "0.2.7"]
with Shadow-CLJS and see this error:Not super sure how to get around it, any guidance would be helpful!
The text was updated successfully, but these errors were encountered: