Fork me on GitHub
#shadow-cljs
<
2024-03-14
>
thheller14:03:29

I created a minimal browser extension to show the shadow-cljs UI as a panel in the browser devtools in case anyone is interested. dunno how long approval is going to take, until then you can just load manually if you want https://github.com/thheller/shadow-cljs-ext

😍 9
👏 9
🥳 7
2
2
souenzzo22:03:15

I'm trying to use helia package from cljs. After npm install helia I'm simply (:require ["helia" :as h] ... and I'm getting this error Error: No "exports" main defined in .../node_modules/helia/package.json The package.json has this export key:

"exports": {
    ".": {
      "types": "./dist/src/index.d.ts",
      "import": "./dist/src/index.js"
    }
  }
This export format isnt supported or I'm doing something wrong?

thheller08:03:25

Error: No "exports" main defined in is not a shadow-cljs error, so I'm not sure where you get it from?

thheller08:03:48

what build :target is this? what runtime does it run in?

souenzzo13:03:38

node-test target with auto-run. I will upload the project soon

thheller13:03:10

then this is a node error, has nothing to do with shadow-cljs

👍 1
thheller13:03:45

easy to verify if you run node -e 'require("helia")'. I suspect that gives the same error

thheller13:03:20

could be that you are required to use node esm mode to be able to require this package? don't know the package so can't say

souenzzo14:03:03

confirm that require("helia") throws on nodejs import("helia") works. For now (js/import "helia") will do the work for me. Thank you thheleer!!!