Just updated nostr-tools from 1.7.4 to 1.12, and now I'm getting some bizarre typescript errors, any ideas for how to fix them?

Error: Module '"nostr-tools"' has no exported member 'generatePrivateKey'. (ts)

import {generatePrivateKey} from "nostr-tools"

Typescript doesn't complain about stuff like `import {nip19} from "nostr-tools"`, it seems to only be exports that are re-exported from index.ts.

nostr:nprofile1qqsrhuxx8l9ex335q7he0f09aej04zpazpl0ne2cgukyawd24mayt8gpz3mhxue69uhhyetvv9ujumn0wd68ytnzvuqjyamnwvaz7tmwdaehgu3dwejhy6txd9jkgtnhv4kxcmmjv3jhytnwv46qzxthwden5te0dehhxarj9eax2cn9v3jk2tnrd3hh2eqpz4mhxue69uhkummnw3ezumtfd3hh2tnvdakqz9thwden5te0v4jx2m3wdehhxarj9ekxzmnyqyxhwumn8ghj7mn0wvhxcmmvqywhwumn8ghj7mn0wd68yttsw43zuam9d3kx7unyv4ezumn9wsq3samnwvaz7tmjv4kxz7fwdehhxarjv96xjtnrdaksz9nhwden5te0wfjkccte9ehx7um5wghxyctwvsq3yamnwvaz7tmwdaehgu3w0f3xgtn8vuq3qamnwvaz7tmwdaehgu3wwa5kuegpwpmhxue69uhk7enxvd5xz6tw9ec82cs2pfmhxue69uhk2tnwdaejumr0ds98wumn8ghj7mn0wvhxcmmvpfmhxue69uhkummnw3ezuun9d3shjetj9eek2znhwden5te0wfjkccte9ehx7um5wghxyec2waehxw309ahkvenrdpskjm3wwp6kyqg3waehxw309ahx7um5wghxcafwddjs3x6pac nostr:nprofile1qqs04xzt6ldm9qhs0ctw0t58kf4z57umjzmjg6jywu0seadwtqqc75spp3mhxue69uhkyunz9e5k7qgjwaehxw309ahx7um5wgh8vvrv9e5k7qg4waehxw309ahx7um5wghxxmmfdehhxtnfduq3vamnwvaz7tmjwdekccte9ehx7um5wghxuet5qyf8wumn8ghj7un9d3shjtnxxaazu6t0qyf8wumn8ghj7ur4wfcxcetsv9njuetnqy2hwumn8ghj7etyv4hzumn0wd68ytnvv9hxgqgdwaehxw309ahx7uewd3hkcqgcwaehxw309amk2mrrdakk2tnwdaehgu3wwa5kuegpz3mhxue69uhhyetvv9ujuerpd46hxtnfduq3vamnwvaz7tmpw3kxzuewdehhxarj9ekxzmnyqyd8wumn8ghj7un9d3shjtnwwdjkxcn4de4k2u3wvdhk6qguwaehxw309ahx7um5wgknqvfwvfhkcapwda38xetjwejhyqgkwaehxw309aex2mrp0yhxummnw3ezucnpdejqzyrhwden5te0dehhxarj9emkjmn9vzlpf4

Reply to this note

Please Login to reply.

Discussion

oh man, I remember that pain but I can't recall how I fixed it

did you update the secp256k1 library?

i just keep my browserslist on the latest

"browserslist": {

"production": [

">0.2%",

"not dead",

"not op_mini all"

],

"development": [

"last 1 chrome version",

"last 1 firefox version",

"last 1 safari version"

]

}

Switching to yarn "fixed" it

Yarn is better anyways. The yarn.lock file is actually a proper lock file.

Agreed, I switched back to npm after about 10 years to try it out, and... yeah

The fact npm modifies the package-lock.json file when you run npm install is frustrating. Just install the same set of packages every time.

what do you think of pnpm vs yarn?

I've not played around with it so I can't offer an opinion. My strong preference for choosing tools (especially JS) though is to pick well established, mature libraries/frameworks.

npm is the devil

yes, but also javascript is the devil

Stop using JavaScript. That fixed it for me.

what can I use for nostr web without needing js?