Installing SnarkyJS with Nodejs

Installing SnarkyJS

Installing SnarkyJS with Nodejs

nodejs

This post aims to share my experience of installing SnarkyJS, which is a TypeScript framework for Mina’s zkApps.

To install SnarkyJS, I first installed Nodejs and npm (npm = node package manager which is automatically installed together with Nodejs). Then we use npm to install SnarkyJS (and many others packages), I got the error EACCES. This is because “I probably ran Nodejs installation with root permissions, that’s why the global package installation is asking you to be root.” (see Stackoverflow))

I follows the instruction of Stackoverflow and installed SnarkyJS successfully. Here is the details.

  1. Uninstall Node by using the command: sudo apt-get remove nodejs
  2. Then install NVM following instructions of this 3 minutes video
  3. Install Nodejs 16 via NVM: nvm install 16

Now Nodejs 16 has been installed, we can verify by node -v to check the version.

Then we are now able to install SnarkyJS by npm install -g zkapp-cli

Test SnarkyJS by using the command zk --help.

Done!

Nhận xét

Bài đăng phổ biến từ blog này

Meta Links

IBC v2