我想知道如何将@metaplex/js模块导入到连接到html的js文件中。如果我使用import语句,就会看到一个错误:“导入标识符必须以".”、“./”以及类似的东西开头。对于solanaWeb3,我必须添加一个带有unpkg链接的脚本标记,作为src并运行。我想知道在哪里可以为@metaplex.js找到相同的脚本src,这样我也可以使用它;)。
import { programs } from "@metaplex/js"这是使用的导入语句,这是我得到的错误
Uncaught TypeError: Error during the resolution of the module identificator “@metaplex/js”. Module identificators must start with “./”, “../” o “/”.发布于 2022-08-16 19:10:44
你可以试试:
<script src="https://unpkg.com/@metaplex/js@latest/lib/index.iife.min.js">
</script>https://stackoverflow.com/questions/71005791
复制相似问题