Mint NFT with Metaplex | Solana API Tutorial - Helping Each Other

Lets use this thread to support each other with questions regarding the Mint NFT with Metaplex | Solana API Tutorial :star_struck:

Read instructions: https://youtu.be/BPQXek6lMUE

Github Repositories:

Feel free to ask for help here - but also ensure YOU HELP people that are asking questions you know the answers to

The Moralis staff and community managers will be keeping an eye on this too :star_struck:

2 Likes

Is it still working after the Candy Machine update? Because v2 seems to be deprecated now.

Cause i’m having this error when i try to verify or create the Candy Machine:

C:\Users\EvandroAK\AppData\Roaming\npm\node_modules\ts-node\src\index.ts:859
return new TSError(diagnosticText, diagnosticCodes, diagnostics);
^
TSError: ⨯ Unable to compile TypeScript:
js/packages/cli/src/candy-machine-v2-cli.ts:4:47 - error TS2307: Cannot find module ‘commander’ or its corresponding type declarations.

4 import { InvalidArgumentError, program } from ‘commander’;
~~~~~~~~~~~
js/packages/cli/src/candy-machine-v2-cli.ts:5:25 - error TS2307: Cannot find module ‘@project-serum/anchor’ or its corresponding type declarations.

5 import * as anchor from ‘@project-serum/anchor’;
~~~~~~~~~~~~~~~~~~~~~~~
js/packages/cli/src/candy-machine-v2-cli.ts:14:45 - error TS2307: Cannot find module ‘@solana/web3.js’ or its corresponding type declarations.

14 import { PublicKey, LAMPORTS_PER_SOL } from ‘@solana/web3.js’;

C:\Users\EvandroAK\Documents\moralis-solana-metaplex-main>ts-node ./js/packages/cli/src/candy-machine-v2-cli.ts verify_assets ./js/packages/cli/assets
C:\Users\EvandroAK\AppData\Roaming\npm\node_modules\ts-node\src\index.ts:859
return new TSError(diagnosticText, diagnosticCodes, diagnostics);
^
TSError: ⨯ Unable to compile TypeScript:
js/packages/cli/src/candy-machine-v2-cli.ts:4:47 - error TS2307: Cannot find module ‘commander’ or its corresponding type declarations.

4 import { InvalidArgumentError, program } from ‘commander’;
~~~~~~~~~~~
js/packages/cli/src/candy-machine-v2-cli.ts:5:25 - error TS2307: Cannot find module ‘@project-serum/anchor’ or its corresponding type declarations.

5 import * as anchor from ‘@project-serum/anchor’;
~~~~~~~~~~~~~~~~~~~~~~~
js/packages/cli/src/candy-machine-v2-cli.ts:14:45 - error TS2307: Cannot find module ‘@solana/web3.js’ or its corresponding type declarations.

14 import { PublicKey, LAMPORTS_PER_SOL } from ‘@solana/web3.js’;
~~~~~~~~~~~~~~~~~
js/packages/cli/src/candy-machine-v2-cli.ts:42:17 - error TS2307: Cannot find module ‘loglevel’ or its corresponding type declarations.

42 import log from ‘loglevel’;
~~~~~~~~~~
js/packages/cli/src/candy-machine-v2-cli.ts:46:25 - error TS2307: Cannot find module ‘mime’ or its corresponding type declarations.

46 import { getType } from ‘mime’;
~~~~~~
js/packages/cli/src/candy-machine-v2-cli.ts:51:22 - error TS2307: Cannot find module ‘@project-serum/anchor/dist/cjs/utils/bytes’ or its corresponding type declarations.

51 import { bs58 } from ‘@project-serum/anchor/dist/cjs/utils/bytes’;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

at createTSError (C:\Users\EvandroAK\AppData\Roaming\npm\node_modules\ts-node\src\index.ts:859:12)
at reportTSError (C:\Users\EvandroAK\AppData\Roaming\npm\node_modules\ts-node\src\index.ts:863:19)
at getOutput (C:\Users\EvandroAK\AppData\Roaming\npm\node_modules\ts-node\src\index.ts:1077:36)
at Object.compile (C:\Users\EvandroAK\AppData\Roaming\npm\node_modules\ts-node\src\index.ts:1433:41)
at Module.m._compile (C:\Users\EvandroAK\AppData\Roaming\npm\node_modules\ts-node\src\index.ts:1617:30)
at Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
at Object.require.extensions.<computed> [as .ts] (C:\Users\EvandroAK\AppData\Roaming\npm\node_modules\ts-node\src\index.ts:1621:12)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12) {

diagnosticCodes: [ 2307, 2307, 2307, 2307, 2307, 2307 ]
}

Which version are you using now?