0
votes

I have recently decided that I want to learn how MetaPlex Candy-Machine work but I have been stuck for the past 4 hours.

When I run this command.

ts-node ~/metaplex/js/packages/cli/src/candy-machine-v2-cli.ts upload \
-e devnet \
-k ~/.config/solana/devnet.json \
-cp config.json \
-c example \
./assets

I get this error message

error: required option '-k, --keypair <path>' not specified
-e : The term '-e' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:2 char:5
+     -e devnet \
+     ~~
    + CategoryInfo          : ObjectNotFound: (-e:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
 
-k : The term '-k' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:3 char:5
+     -k ~/.config/solana/devnet.json \
+     ~~
    + CategoryInfo          : ObjectNotFound: (-k:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
 
-cp : The term '-cp' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:4 char:5
+     -cp config.json \
+     ~~~
    + CategoryInfo          : ObjectNotFound: (-cp:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
 
-c : The term '-c' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:5 char:5
+     -c example \
+     ~~
    + CategoryInfo          : ObjectNotFound: (-c:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
 
./assets : The term './assets' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:6 char:5
+     ./assets
+     ~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (./assets:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException 

any help would be appreciated

1

1 Answers

1
votes

Windows often cannot handle those multi line commands. Try to put it all on one line like this.

ts-node ~/metaplex/js/packages/cli/src/candy-machine-v2-cli.ts upload -e devnet -k ~/.config/solana/devnet.json -cp config.json -c example ./assets

Or if you really currently start learning use sugar. It's just a different command line tool but much easier to understand: https://github.com/metaplex-foundation/sugar