2
votes

I am trying to create a new application in Parse Cloud Code. According to instructions I have to create an app in Parse.com then run the following command: parse new [application name]

so I created a new app called ABCDE (example name) and called the following: parse new 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.

I chose 1 anyway and got the following error:

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. 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.

I entered 1 anyway and it finished the process with no errors but created the following config file which is broken I believe:

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

Any ideas how to fix this?

2
Is your issue resolved yet or no? - sivag1

2 Answers

4
votes

Ok, downloading the latest CLI did not help me on my Windows. The new CLI is stuck and does not respond. But I resolved the issue on Mac.

This is what I did.

  1. Delete the parse file from the path /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.

curl -s https://www.parse.com/downloads/cloud_code/installer.sh | sudo /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

  1. Now try running the "parse new" command. It yields the result as expected.
2
votes

Looks like the CLI download in the getting started guide is not the latest version. Try downloading it from here:

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. When you run parseconsole.exe it should work as expected!