Open dutterbutter opened 1 month ago
When using zksync-cli to spin up a local block explorer it frequently errors due to permissions.
Provide a clear and concise description of the bug.
Install zkSync CLI using Bunx
Run the following command to install or update the zkSync CLI:
bunx zksync-cli@latest dev config
Select Node Type and Enable Block Explorer
Follow the on-screen prompts to configure your environment:
Start the zkSync Development Environment
Once configuration is complete, run the following command to start the environment:
bunx zksync-cli@latest dev start
Observe the Error
When starting the environment, you will encounter the following error related to file permissions during the installation of Block Explorer:
Installing "Block Explorer"... β There was an error while starting the testing environment: β EACCES: permission denied, copyfile '/private/tmp/bunx-501-zksync-cli@latest/node_modules/zkcli-block-explorer/docker-compose.yml' -> '/Users/dustinbrickwood/.local/state/zksync-cli/modules/zkcli-block-explorer/docker-compose.yml' node:fs:2969 handleErrorFromBinding(ctx); ^ Error: EACCES: permission denied, copyfile '/private/tmp/bunx-501-zksync-cli@latest/node_modules/zkcli-block-explorer/docker-compose.yml' -> '/Users/dustinbrickwood/.local/state/zksync-cli/modules/zkcli-block-explorer/docker-compose.yml' at Object.copyFileSync (node:fs:2969:3) at SetupModule.install (file:///private/tmp/bunx-501-zksync-cli@latest/node_modules/zkcli-block-explorer/dist/index.js:96:16) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async installModules (file:///private/tmp/bunx-501-zksync-cli@latest/node_modules/zksync-cli/bin/commands/dev/start.js:17:9) at async Command.handler (file:///private/tmp/bunx-501-zksync-cli@latest/node_modules/zksync-cli/bin/commands/dev/start.js:149:9) { errno: -13, syscall: 'copyfile', code: 'EACCES', path: '/private/tmp/bunx-501-zksync-cli@latest/node_modules/zkcli-block-explorer/docker-compose.yml', dest: '/Users/dustinbrickwood/.local/state/zksync-cli/modules/zkcli-block-explorer/docker-compose.yml', level: 'error', [Symbol(message)]: "\\x1B[91mβ EACCES: permission denied, copyfile '/private/tmp/bunx-501-zksync-cli@latest/node_modules/zkcli-block-explorer/docker-compose.yml' -> '/Users/dustinbrickwood/.local/state/zksync-cli/modules/zkcli-block-explorer/docker-compose.yml'\\x1B[39m" } Node.js v18.17.0
For the block explorer to start up with no issues.
Errors with permissions issue:
Installing "Block Explorer"... β There was an error while starting the testing environment: β EACCES: permission denied, copyfile '/private/tmp/bunx-501-zksync-cli@latest/node_modules/zkcli-block-explorer/docker-compose.yml' -> '/Users/dustinbrickwood/.local/state/zksync-cli/modules/zkcli-block-explorer/docker-compose.yml' node:fs:2969 handleErrorFromBinding(ctx); ^ Error: EACCES: permission denied, copyfile '/private/tmp/bunx-501-zksync-cli@latest/node_modules/zkcli-block-explorer/docker-compose.yml' -> '/Users/dustinbrickwood/.local/state/zksync-cli/modules/zkcli-block-explorer/docker-compose.yml' at Object.copyFileSync (node:fs:2969:3) at SetupModule.install (file:///private/tmp/bunx-501-zksync-cli@latest/node_modules/zkcli-block-explorer/dist/index.js:96:16) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async installModules (file:///private/tmp/bunx-501-zksync-cli@latest/node_modules/zksync-cli/bin/commands/dev/start.js:17:9) at async Command.handler (file:///private/tmp/bunx-501-zksync-cli@latest/node_modules/zksync-cli/bin/commands/dev/start.js:149:9) { errno: -13, syscall: 'copyfile', code: 'EACCES', path: '/private/tmp/bunx-501-zksync-cli@latest/node_modules/zkcli-block-explorer/docker-compose.yml', dest: '/Users/dustinbrickwood/.local/state/zksync-cli/modules/zkcli-block-explorer/docker-compose.yml', level: 'error', [Symbol(level)]: 'error', [Symbol(message)]: "\\x1B[91mβ EACCES: permission denied, copyfile '/private/tmp/bunx-501-zksync-cli@latest/node_modules/zkcli-block-explorer/docker-compose.yml' -> '/Users/dustinbrickwood/.local/state/zksync-cli/modules/zkcli-block-explorer/docker-compose.yml'\\x1B[39m" } Node.js v18.17.0
Paste any relevant log output here.
Had to adjust permissions locally by running sudo chown -R $(whoami) on the issued path.
sudo chown -R $(whoami)
π Bug Report for Block Explorer zkcli module
π Description
When using zksync-cli to spin up a local block explorer it frequently errors due to permissions.
Provide a clear and concise description of the bug.
π Reproduction Steps
Steps to Reproduce
Install zkSync CLI using Bunx
Run the following command to install or update the zkSync CLI:
Select Node Type and Enable Block Explorer
Follow the on-screen prompts to configure your environment:
Start the zkSync Development Environment
Once configuration is complete, run the following command to start the environment:
Observe the Error
When starting the environment, you will encounter the following error related to file permissions during the installation of Block Explorer:
π€ Expected Behavior
For the block explorer to start up with no issues.
π― Current Behavior
Errors with permissions issue:
π₯οΈ Environment
π Additional Context
π Log Output