Catalyst

by Zoho

Go to console

Catalyst CLI FAQ

Browse through questions related to the Catalyst CLI, such as its installation, various CLI
commands available for all services, resolving errors and bugs in the comamnd executions, and more.

×

General

How do I work with Catalyst CLI?

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.

How will I know when there is a Catalyst CLI update?

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.

catalyst_faq_cli_update

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.

How do I report an issue in Catalyst CLI?

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.

Why do I get a 'Catalyst command not found' error in the CLI?

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:

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

  2. You must also check if the NPM version is greater than v12 by executing the npm -v command in your terminal.

  3. Uninstall and reinstall Catalyst CLI with the sudo command in MacOS or in the Windows command prompt in the administrator mode.

How do I resolve the 'SyntaxError: Unexpected token' error while executing Catalyst CLI commands?

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

How do I resolve the 'Unable to get local issuer certificate' error when I execute a Catalyst command?

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.

How do I resolve the 'JavaioInvoker has been compiled by a more recent version of the Java runtime' error?

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

Why do I get the error 'HTTP Error: 401. You do not have privileges to access this project. Please contact a project owner or an administrator of this account' when I try to initialize my Catalyst project using catalyst init?

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

Why do I get a 'Cannot understand what targets. Check if you specified valid targets' error when I run catalyst serve?

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.

How do I test my functions in a no watch mode locally?
Catalyst will serve your functions in the watch mode by default to ensure you can easily perform hot code replacement. You can execute the CLI command catalyst serve –no-watch to switch to a no watch mode.

Why do I get 'Changes in file detected' and 'Error: unable to proxy request' error messages while performing file related operations in local debugging using catalyst serve?
This error will occur when you perform file operations using the catalyst serve command. To resolve this problem, use the option –no-watch with catalyst serve for local debugging while performing any file related operations. The –no-watch command disables hot module replacement.

Why do I encounter the error 'Javac version is above the compatible version' when I try to run my Catalyst application locally using catalyst serve.
Catalyst only supports the versions Java 8, Java 11, and Java 17 currently. You must therefore ensure that the installed java and javac versions are 1.8.x, 11.0.x, or 17.0.x before you debug a Java function in the CLI.

CLI Functions Shell

How do I test Cron functions locally using the CLI?
You can execute your cron function locally by using the catalyst shell command in the CLI. You can pass a JSON variable as the input to the cron function. The cron function will contain the variable context with all function details, even during local debugging.

How do I test my event function locally using the CLI?

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

Why do I get the error 'We are unable to process the request since there are more than 500 files in the zip provided.' when I try to deploy my client?
You will encounter this error if there are more than 500 files present in your client folder. The maximum number of files allowed in Catalyst web client is 500.

Last Updated 2023-10-04 11:17:13 +0530 +0530