completely forgot about the websocket-polyfill, removed from the nostr-tools readme. Now recommends this:

``

import { useFetchImplementation } from 'nostr-tools/nip05'

useFetchImplementation(require('node-fetch'))

``

Adding that to ndk fixed it. Thanks!

Reply to this note

Please Login to reply.

Discussion

```

import { useWebSocketImplementation } from 'nostr-tools/pool'

// or import { useWebSocketImplementation } from 'nostr-tools/relay' if you're using the Relay directly

import WebSocket from 'ws'

useWebSocketImplementation(WebSocket)

```

copied wrong snippet.