'Failure to execute commands when uploading CandyMachinev2 to devnet
I've been trying to fix a certain issue for the past day, and I can confidently say that I'm stuck. I've been trying to follow the guide for uploading a CMV2 to Devnet, but to no avail, by using this as my resource: https://docs.metaplex.com/candy-machine-v2/creating-candy-machine
The code that I've been trying to use is
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
But this is what shows up
-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:1 char:5
+ -e devnet \
+ ~~
+ CategoryInfo : ObjectNotFound: (-e:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
PS C:\Users\Acer> -k ~/.config/solana/devnet.json \
-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:1 char:5
+ -k ~/.config/solana/devnet.json \
+ ~~
+ CategoryInfo : ObjectNotFound: (-k:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
PS C:\Users\Acer> -cp config.json \
-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.
+ -cp config.json \
+ CategoryInfo : ObjectNotFound: (-cp:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
PS C:\Users\Acer> -c example \
-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
At line:1 char:5
+ -c example \
+ ~~
+ CategoryInfo : ObjectNotFound: (-c:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
I'm pretty much confident that I'm never going past this step. There's so many unexecutable commands. I've also tried compiling it as one command line, but it also does not work.
I've tried using
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
and
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
Neither worked either
Solution 1:[1]
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
This command will work but hopefully you have checked the values you are passing in are correct. If you are running exactly the above command without changing the -k -cp -e and -c values that would explain why it also failed. The first command with \ dividing the options can have issues copy and pasting straight into a windows cmd prompt which is why you get the error explaining:
-e : The term '-e' is not recognized as the name of a cmdlet, function, script file, or operable program.
I would recommend making sure you change the values for the options in the command. To understand what they should be run:
ts-node ~/metaplex/js/packages/cli/src/candy-machine-v2-cli.ts upload --help
Use these docs as your aid for the whole candy machine process https://docs.metaplex.com/candy-machine-v2/introduction
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Sean O |
