这可能是一个愚蠢的问题,但我正在努力学习如何在附近的学院与近协议工作。
在第六章,你有一个任务,登录到附近使用CLI,注册自己作为一个模因博物馆的贡献者和注册你的模因。
链接到第6章:https://near.academy/near101/chapter-6
当我试图注册这个模因时,我遇到了一个问题。我收到一个错误:
未知数:{meme : bingoo,标题:话音素,数据:,类别: 4}
我不知道为什么这些论点被认为是未知的。
,这是代码:
近call museum.testnet add_meme \ '{"meme“:"bingoo","title”:“话音素”,"https://9gag.com/gag/a718nWb"“,”https://9gag.com/gag/a718nWb"“类别: 4}‘--accountId bingoo.testnet --数额4
发布于 2022-03-24 01:09:48
我用的是一台windows机器,我也收到了同样的错误。
我尝试了很多事情,我在主机上看到这个AWS帖子使用aws:https://docs.aws.amazon.com/cli/latest/userguide/cli-usage-parameters-quoting-strings.html中的引号。
我认为对于windows,您不能在json对象周围使用单引号,对于换行符不能使用\。我只需要一根长的字符串和“在json.里面”,就像这样:
near call museum.testnet add_meme "{\"meme\" : \"bingoo\", \"title\" : \"telephonememe\", \"data\" : \"https://9gag.com/gag/a718nWb\", \"category\" : 4}" --accountId bingoo.testnet --amount 4我认为这就是为什么他们建议在他们的github中为windows使用wsl : Windows用户使用Windows,我们建议使用Windows Subsystem for (WSL)。
Install WSL
Install npm
Install Node.js
Change npm default directory
This is to avoid any permission issues with WSL
Open WSL and install near-cli globally by running:
npm install -g near-clihttps://stackoverflow.com/questions/71383538
复制相似问题