matter-labs / zksync-cli

CLI tool that simplifies ZKsync development
MIT License
163 stars 93 forks source link

Docker compose problems on zksync-cli dev start #151

Open alexhooketh opened 1 month ago

alexhooketh commented 1 month ago

πŸ› Bug Report for zkSync CLI

πŸ“ Description

I'm not at all sure if it's actually a bug. I'm probably doing something wrong but still

I'm getting this error when trying to init a project:

jordan@Air-Alex contracts % zksync-cli dev start

? Node to use In memory node
? Additional modules to use Block Explorer
You can change the config later with `npx zksync-cli dev config`

β“˜ There was an error while starting the testing environment:
β“˜ Command exited with code 16: unknown docker command: "compose Support/fnm/node-versions/v18.19.0/installation/lib/node_modules/zksync-cli/node_modules/zkcli-in-memory-node/docker-compose.yml"

file:///Users/jordan/Library/Application%20Support/fnm/node-versions/v18.19.0/installation/lib/node_modules/zksync-cli/bin/utils/helpers.js:52
                reject(new Error(`Command exited with code ${code}: ${errorOutput}`));
                       ^

Error: Command exited with code 16: unknown docker command: "compose Support/fnm/node-versions/v18.19.0/installation/lib/node_modules/zksync-cli/node_modules/zkcli-in-memory-node/docker-compose.yml"

    at ChildProcess.<anonymous> (file:///Users/jordan/Library/Application%20Support/fnm/node-versions/v18.19.0/installation/lib/node_modules/zksync-cli/bin/utils/helpers.js:52:24)
    at ChildProcess.emit (node:events:517:28)
    at maybeClose (node:internal/child_process:1098:16)
    at Socket.<anonymous> (node:internal/child_process:450:11)
    at Socket.emit (node:events:517:28)
    at Pipe.<anonymous> (node:net:350:12) {
  level: 'error',
  [Symbol(level)]: 'error',
  [Symbol(message)]: '\x1B[91mβ“˜ Command exited with code 16: unknown docker command: "compose Support/fnm/node-versions/v18.19.0/installation/lib/node_modules/zksync-cli/node_modules/zkcli-in-memory-node/docker-compose.yml"\x1B[39m\n' +
    '\x1B[91m\x1B[39m'
}

Node.js v18.19.0

I'm running a Docker Desktop, but I have no idea how it works, so I might need to enable something in it. Node and zksync-cli were just installed using brew and npm i respectively

πŸ”„ Reproduction Steps

  1. run docker desktop
  2. brew install node
  3. npm i -g zksync-cli
  4. zksync-cli dev start
  5. select all the stuff about the project
  6. boom

πŸ€” Expected Behavior

the project initializes

😯 Current Behavior

the project does not initialize

πŸ–₯️ Environment

πŸ“‹ Additional Context

ZKsync Docs say nothing about Docker at all but I just assumed it's necessary because of docker compose error. image image

alexhooketh commented 1 month ago

now that i look at it the problem might be in the space in the path

Command exited with code 16: unknown docker command: "compose Support/fnm/node-versions/v18.19.0/installation/lib/node_modules/zksync-cli/node_modules/zkcli-in-memory-node/docker-compose.yml"