简体   繁体   English

在Cloud Code中建立新的Parse应用程式时出现问题/错误

[英]Issue/Bug when creating new Parse app in Cloud Code

I am trying to create a new application in Parse Cloud Code. 我正在尝试在Parse Cloud Code中创建一个新的应用程序。 According to instructions I have to create an app in Parse.com then run the following command: parse new [application name] 根据说明,我必须在Parse.com中创建一个应用程序,然后运行以下命令:解析新的[应用程序名称]

so I created a new app called ABCDE (example name) and called the following: parse new ABCDE 所以我创建了一个名为ABCDE(示例名称)的新应用,并将其命名为:解析新的ABCDE

but I saw the following weird output : 但我看到以下奇怪的输出:

... [Some lines indicating it is creating files] ...
Email: ******
Password:  ******
1: results
Select an App:

So basically the command line was not capable of pulling the list of my apps (Only one App at that moment) and showed 1:results as the only menu item instead of 1: ABCDE. 因此,基本上,命令行无法提取我的应用程序列表(当时仅一个应用程序),并且显示1:结果作为唯一菜单项,而不是1:ABCDE。

I chose 1 anyway and got the following error: 无论如何,我选择了1并得到以下错误:

Traceback (most recent call last):
  File "<string>", line 6, in <module>
  File ".\build\pyi.win32\parse\out00-PYZ.pyz\main", line 711, in main
  File ".\build\pyi.win32\parse\out00-PYZ.pyz\main", line 424, in handle_add
  File ".\build\pyi.win32\parse\out00-PYZ.pyz\config_handler", line 174, in add_app
IndexError: list index out of range

After struggeling with this for quite some time I decided to create a new App and lets say I called it XYZ and followed the same steps. 经过一段时间的努力后,我决定创建一个新的应用程序,可以说我将其命名为XYZ并遵循相同的步骤。 This time also I got the following option even through I had two apps: 这次即使我有两个应用程序,我也有以下选择:

... [Some lines indicating it is creating files] ...
Email: ******
Password:  ******
1: results
Select an App:

So it showed 1: results instead of 1: ABCDE 2:XYZ. 因此显示为1:结果,而不是1:ABCDE 2:XYZ。

I entered 1 anyway and it finished the process with no errors but created the following config file which is broken I believe: 无论如何,我输入了1,它没有错误地完成了该过程,但是创建了以下配置文件,我相信它已损坏:

{
"applications": {
    "_default": {
        "link": "results"
    }, 
    "results": {
        "applicationId": {
            "appName": "ABCDE", 
            "applicationId": "*****", 
            "masterKey": "****"
        }, 
        "masterKey": {
            "appName": "XYZ", 
            "applicationId": "*****", 
            "masterKey": "*****"
        }
    }
}
}

Any ideas how to fix this? 任何想法如何解决这一问题?

Ok, downloading the latest CLI did not help me on my Windows. 好的,下载最新的CLI不能在Windows上为我提供帮助。 The new CLI is stuck and does not respond. 新的CLI卡住了,无法响应。 But I resolved the issue on Mac. 但是我在Mac上解决了这个问题。

This is what I did. 这就是我所做的。

  1. Delete the parse file from the path /usr/local/bin/parse. 从路径/ usr / local / bin / parse中删除分析文件。 This is a MUST DO. 这是必须做的。 Simply reinstalling did not help. 只是重新安装没有帮助。

  2. Then run the below command to reinstall the Mac command line tool. 然后运行以下命令以重新安装Mac命令行工具。

curl -s https://www.parse.com/downloads/cloud_code/installer.sh | curl -s https://www.parse.com/downloads/cloud_code/installer.sh | sudo /bin/bash 须藤/ bin / bash

The command is standard and as found in the Parse instructions below. 该命令是标准命令,可在下面的“解析”说明中找到。 But removing the previous instance is vital. 但是删除先前的实例至关重要。 https://parse.com/apps/quickstart#cloud_code/unix https://parse.com/apps/quickstart#cloud_code/unix

  1. Now try running the "parse new" command. 现在尝试运行“ parse new”命令。 It yields the result as expected. 它产生预期的结果。

Looks like the CLI download in the getting started guide is not the latest version. 入门指南中的CLI下载似乎不是最新版本。 Try downloading it from here: 尝试从此处下载:

https://parse.com/docs/downloads https://parse.com/docs/downloads

Once you have downloaded the latest version, rename it as 'parse.exe' and replace the parse.exe in your original download. 下载最新版本后,将其重命名为“ parse.exe”并替换原始下载中的parse.exe。 When you run parseconsole.exe it should work as expected! 当您运行parseconsole.exe时,它应该可以正常工作!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM