过去一天我一直在尝试解决某个问题,我可以自信地说我被卡住了。我一直试图按照指南将CMV2上传到Devnet,但没有成功,我将其用作我的资源:https://docs.metaplex.com/candy-machine-v2/creating-candy-machine
我一直在尝试使用的代码是
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
但这就是的表现
-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:UsersAcer> -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:UsersAcer> -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:UsersAcer> -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
我非常有信心,我永远不会超过这一步。有太多无法执行的命令。我也尝试过将它编译为一个命令行,但它也不起作用。
我试过使用
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
和
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
两者都不起作用
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
这个命令会起作用,但希望您已经检查了传入的值是否正确。如果您正是在不更改-k-cp-e和-c值的情况下运行上面的命令,这可以解释为什么它也失败了。第一个带有\分割选项的命令可能会出现问题,直接复制并粘贴到windows cmd提示符中,这就是为什么您会得到错误解释:
-e : The term '-e' is not recognized as the name of a cmdlet, function, script file, or operable program.
我建议您确保更改命令中选项的值。了解应该运行什么:
ts-node ~/metaplex/js/packages/cli/src/candy-machine-v2-cli.ts upload --help
使用这些文档作为整个糖果机过程的辅助工具https://docs.metaplex.com/candy-machine-v2/introduction