What is Nostr?
Vivek
npub1ltx…z40t
2024-03-23 02:05:32
in reply to nevent1q…aws0

Vivek on Nostr: import statements cannot be used in normal javascript functions you embed in ...

import statements cannot be used in normal javascript functions you embed in HTML,without doing something called modularization.

Depending on your situation, one of the examples in this page can help you - https://www.w3schools.com/js/js_modules.asp

If you are running in nodejs, you might want to start with a `npm init` command, add ndk using `npm add ...` command suggested by ndk and then write your code in the index.js file, then run as `node index.js.`

Good luck with NDK BTW :)
Author Public Key
npub1ltx67888tz7lqnxlrg06x234vjnq349tcfyp52r0lstclp548mcqnuz40t