-1

过去一天我一直在尝试解决某个问题,我可以自信地说我被卡住了。我一直在尝试按照指南将 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:\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

我非常有信心,我永远不会超过这一步。有很多无法执行的命令。我也尝试将它编译为一个命令行,但它也不起作用。

我试过使用

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

也没有工作

4

1 回答 1

0
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

于 2022-01-23T23:29:14.150 回答