Troubleshooting
Encountering issues with ZKsync CLI? Here are some common problems and step-by-step recommendations for resolving them:
command not found: zksync-cli
If you try to use the zksync-cli
command and receive the command not found
message,
check to see if you have the package installed on your machine.
The following command will list the package and version if you have zksync-cli
installed globally.
npm list -g zksync-cli
unknown command
Error
If you encounter an unknown command
error, follow these steps:
a. Check the ZKsync CLI version
- Run
zksync-cli --version
to check your current version. - Compare it with the latest version available on npm.
- If your version is lower than the one on npm, follow the steps under Update ZKsync CLI on Getting Started.
If your version is up-to-date, it's possible that the command was moved or renamed.
Use zksync-cli help
for a list of current commands or refer to the documentation.
b. Remove local installations
- Use
npm list zksync-cli
to check ifzksync-cli
is installed in the current directory or any parent directories from where you are running your terminal. - If it is installed, uninstall it by running
npm uninstall zksync-cli
in its installation location.
Remove all instances of locally installed zksync-cli
packages until none are found by npm list zksync-cli
.
c. Verify global installation
- Use
npm list -g zksync-cli
to check ifzksync-cli
is installed globally.
d. Clean npm Cache
- Run
npm cache clean --force
.
My version is outdated
If zksync-cli
is not running the latest version:
- Refer to the instructions for
unknown command
Error above to check and update your ZKsync CLI version.
Other issues
For all other issues, we encourage you to seek help or report them in our GitHub Discussions.