Fork me on GitHub
#nbb
<
2022-10-25
>
jjttjj01:10:31

Is there a way to use from nbb an npm library that uses json modules as described here: https://v8.dev/features/import-assertions? I'm using a library that uses an import statement with a json file, as in that link, and getting

Module "file:///c:/path/to/project/node_modules/library/stuff.json" needs an import assertion of type "json"
I'm not sure if this works in clojurescript proper either, but can't try that out until tomorrow. I suspect it'll be the same error though.

borkdude08:10:21

Do you have a repro?

borkdude08:10:34

Like, what library?

jjttjj11:10:11

Basically trying to copy the first steps of this guide here: https://docs.uniswap.org/sdk/guides/quick-start

borkdude11:10:02

This is the repro with pure JS:

import { Pool } from "@uniswap/v3-sdk";

console.log("hi");
I get a similar error

jjttjj11:10:48

Ah, must be some problem with the tutorial/libraries. Thanks for checking