o1-labs / zkapp-cli

CLI to create a zkApp (zero-knowledge app) for Mina Protocol
https://docs.minaprotocol.com/zkapps/how-to-write-a-zkapp
Apache License 2.0
114 stars 43 forks source link

Failed to detect the installed CLI version. #550

Closed satyambnsal closed 8 months ago

satyambnsal commented 8 months ago

Describe the bug

Deploy account fails to detect installed zkapp-cli version in getInstalledCliVersion method if NodeJS. This usually happens if NodeJS is installed by tools like Volta

If that is the case, We get the following error

TypeError: Cannot read properties of undefined (reading '0')
    at hasBreakingChanges (file:///Users/satyam/.volta/tools/image/packages/zkapp-cli/lib/node_modules/zkapp-cli/src/lib/deploy.js:561:26)

Steps to Reproduce

  1. Install NodeJS with Volta or something similar on your machine.
  2. Install zkapp-cli using npm install -g zkapp-cli
  3. Run zk config and then zk deploy command inside a zk project.

System Info

System:
    OS: macOS 13.2.1
    CPU: (8) arm64 Apple M1
  Binaries:
    Node: 21.2.0 - ~/.volta/tools/image/node/21.2.0/bin/node
    Yarn: 1.22.18 - ~/.volta/tools/image/yarn/1.22.18/bin/yarn
    npm: 9.2.0 - ~/.volta/tools/image/npm/9.2.0/bin/npm
  npmPackages:
    o1js: 0.15.2
  npmGlobalPackages:
    zkapp-cli: Not Found

Severity

annoyance

Additional Information

No response

ymekuria commented 8 months ago

Closed with #551