Skip to content
This repository was archived by the owner on Mar 26, 2025. It is now read-only.
This repository was archived by the owner on Mar 26, 2025. It is now read-only.

TypeError: bundlrStorage is not a function #547

Description

@NetGodFather
const web3 = require('@solana/web3.js');
const { Metaplex, keypairIdentity, bundlrStorage } = require('@metaplex-foundation/js');

const connection = new web3.Connection(web3.clusterApiUrl('devnet'));
const wallet = web3.Keypair.generate();

async function createNFT() {
    const metaplex = Metaplex.make(connection)
        .use(keypairIdentity(wallet))
        .use(bundlrStorage());

    const { nft } = await metaplex.nfts().create({
        uri: 'https://example.com/my-nft-metadata.json',
        name: 'My NFT',
        sellerFeeBasisPoints: 500, // 5%
    }).run();

    console.log(nft);
}

createNFT().catch(console.error);

Error reported:

TypeError: bundlrStorage is not a function
    at createNFT (/Users/tallone/Documents/Umi/index.js:10:14)
    at Object.<anonymous> (/Users/tallone/Documents/Umi/index.js:21:1)
    at Module._compile (node:internal/modules/cjs/loader:1378:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1437:10)
    at Module.load (node:internal/modules/cjs/loader:1212:32)
    at Module._load (node:internal/modules/cjs/loader:1028:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:142:12)
    at node:internal/main/run_main_module:28:49

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions