1

i want to know how i can import the @metaplex/js module into a js file connected to the html. If i use the import statement i get an error saying "Import identifiers must start with ".", "./"" and things like this. For solanaWeb3 i had to add a script tag with a unpkg link as src and its working. Id like to know where can i find the same script src for @metaplex.js so i can use that too ;).

import { programs } from "@metaplex/js"

this is the import statement used and this is the error i get

Uncaught TypeError: Error during the resolution of the module identificator “@metaplex/js”. Module identificators must start with “./”, “../” o “/”.

1 Answers1

0

You could try:

<script src="https://unpkg.com/@metaplex/js@latest/lib/index.iife.min.js">
</script>
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the [help center](https://stackoverflow.com/help/how-to-answer). – Ethan Aug 17 '22 at 22:50