General
You can refer to the Installing Catalyst CLI help page for help with installing the Catalyst CLI.
Once you have installed Catalyst CLI using the npm command, you can work with the CLI from your terminal. Catalyst commands begin with the keyword catalyst. You can refer to the CLI documentation for detailed help with all the CLI commands.
When a newer version of the Catalyst CLI is available, your terminal will display a message alerting you of it after you execute a CLI command successfully.
To update your CLI, execute the following command:
copy$ npm install -g zcatalyst-cli
Note:
-
In rare cases, your system’s registry values might not reflect the latest version of Catalyst CLI. This might cause your system to retain the older version of the CLI. To avoid this, mention the version number while executing the command. For example, to update to the version 1.14.1, run $ npm install -g zcatalyst-cli @1.14.1
-
If you are unable to update Catalyst CLI, execute the command using sudo.
Alternatively, you can visit the NPM website to check whether you are using the latest version.
If there are any issues or abnormal behaviors detected in the CLI, Catalyst will automatically create a catalyst-debug.log file in the directory the command was executed from. You can then contact the Catalyst team through our support email address: support@zohocatalyst.com.
Please provide a brief description of the issue and attach the catalyst-debug.log file in the email. The Catalyst team will contact you in less than 24 hours with a solution for the issue.
You might encounter this error if Catalyst CLI is not properly installed in your local system. You can try the following steps to rectify this error:
-
You will need to check if you installed the latest stable Node version, and if it is greater than v12, by executing the node -v command in your terminal.
-
You must also check if the NPM version is greater than v12 by executing the npm -v command in your terminal.
-
Uninstall and reinstall Catalyst CLI with the sudo command in MacOS or in the Windows command prompt in the administrator mode.
Catalyst CLI only supports Node.js v12 or later. If you encounter this error, it could mean that you have a lower version of Node.js installed in your system.
You can update the Node.js version to resolve this error by downloading Node.js v12 or higher for your platform from their official website, or use a Node version manager like NVM to install Node.js and NPM. NPM comes bundled with Node.js when you install it. To check if Node.js has been updated successfully, execute the following command in your terminal to verify the version:
copy$ node -v
You will encounter this error if strict TLS authorization has been enabled in your system. You can resolve this error by executing the following command in your terminal:
copy$ set NODE_TLS_REJECT_UNAUTHORIZED=0
You can now retry executing the Catalyst command. If the issue still isn’t resolved, contact Catalyst support at support@zohocatalyst.com for further assistance.
The CLI only compiles the Java classes at runtime. Therefore, if the version of the Java environment and the javac you are using are different, you will encounter this error.
You can check the Java version by executing the following command in your terminal:
copy$ java -version
Similarly, you can check the javac version by executing the command in your terminal:
copy$ javac -version
If you have any further queries, you can contact Catalyst support at support@zohocatalyst.com.
Initialize Resources
This issue will occur when you try to initialize your project in a folder that already contains a Catalyst project from a different account. This issue will also occur when you try to initialize a project in a new folder in a location where another project was previously initialized from a different account.
For example: Assume you initialize a project in this location: C/windows/system32/catalyst/aliencity
If the roots of the folders named catalyst, system32, or windows already have a Catalyst project initialized in them, you will encounter this error. However, you can have projects in these directories within their own folders.
To resolve this issue, delete all Catalyst related files including the hidden file named .catalystrc from the current folder as well as from the other folders in the path, and then execute the catalyst init command again.
Serve Resources
If you encounter this error while executing catalyst serve, you can resolve it in the following ways:
- Ensure you are in the correct folder path when you serve targets.
- Ensure your project directory is not empty and contains atleast one resource that can be served. Catalyst can serve function endpoints of types Basic I/O and Advanced I/O, client, and AppSail resources. You can also pull the latest code of your resources from the Catalyst console to your local system through the catalyst pull command, before you serve it.
CLI Functions Shell
You can execute your event function locally using the catalyst shell command in the Catalyst CLI. You can generate a sample payload for your event function to test it by executing the catalyst event:generate {component} {action} command.
For example: catalyst event:generate DataStore insert. This will generate a sample payload for a Data Store insert operation. You can then pass the generated payload as the input to your event function in the CLI.
Deploy Resources
Last Updated 2023-10-04 11:17:13 +0530 +0530
Yes
No
Send your feedback to us