I am currently in the process of creating a token within the Solana network, but I've encountered a particular issue. I have successfully installed @metaplex-foundation/mpl-token-metadata and integrated it into my code; however, an error is persisting.
My approach is based on following this tutorial:
Error:
The 'PROGRAM_ID' property does not exist on the type 'typeof import("d:/Documents/VSC_Files/Token/node_modules/@metaplex-foundation/mpl-token-metadata/dist/src/index")'.
This is the snippet of code causing the issue:
import * as mpl from "@metaplex-foundation/mpl-token-metadata";
import * as web3 from "@solana/web3.js"
import * as anchor from '@project-serum/anchor'
export function loadWalletKey(keypairFile: string): web3.Keypair {
const fs = require("fs");
const loaded = web3.Keypair.fromSecretKey(
new Uint8Array(JSON.parse(fs.readFileSync(keypairFile).toString())),
);
return loaded;
}
// Additional code here...
I attempted to install both metaplex js and metaplex umi and imported them, unfortunately without success.