1

The imports mentioned in the docs for the JS library are not valid.

Following this guide: https://docs.metaplex.com/programs/candy-machine/getting-started, I get the error that 'mplCandyMachine() is not a function' when implementing the following code:

import { createUmi } from '@metaplex-foundation/umi-bundle-defaults';
import { mplCandyMachine } from '@metaplex-foundation/mpl-candy-machine';

const umi = createUmi('https://my.rpc.url').use(mplCandyMachine());

This occurs whether or not I use the @latest tag.

A similar issue occurs when importing TokenStandard from @metaplex-foundation/mpl-token-metadata, although this can be resolved by simply removing the package and then re-installing without using any version tag (yarn remove @metaplex-foundation/mpl-token-metadata && yarn add @metaplex-foundation/mpl-token-metadata).

3
  • 1
    I have the same issue. For me it also says createUmi() expects 0 arguments, yet an endpoint is provided in example...
    – Mackini
    Commented Jun 14, 2023 at 1:40
  • Just to confirm are you using @alpha or @latest for @metaplex-foundation/mpl-candy-machine?
    – sohrab
    Commented Jun 19, 2023 at 23:41
  • @sohrab I had tried using both - attempted to use @latest after I failed to get it working with @alpha. Might have been updates since I made this question, though.
    – Muckee
    Commented Jun 20, 2023 at 14:11

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.