1. Environment Setup
[MUST] For this tutorial, you must follow the versions specified on the first page when you are setting up the environment. Please change the node version to 10.16.0 by using nvm before downloading caver-js.
1) Node.js (npm) 설치
Node.js (npm)는 다음 공식 사이트에서 다운로드할 수 있습니다: https://nodejs.org/
Install the package by clicking the download file.
Type
$ node --version
in your terminal to verifynode
has been successfully installed.
⚠ At the time of writing, the latest LTS version that is compatible with caver-js
is 10.16.0. If you have a higher node version, caver-js
cannot be installed. 안정적인 환경을 설정하려면 Node를 다시 설치하거나 NVM (Node Version Manager)를 사용하세요.
2) 트러플 설치
Truffle is a great tool for compiling and deploying contract files.
Use
nvm
to set the node version to 12.0.0 only if you are using truffle.
Type
$ nvm install 12.0.0
Type
$ nvm use 12.0.0
Type
$ sudo npm install -g truffle
in your terminal to install truffle.Type
$ truffle version
in your terminal to verifytruffle
has been installed successfully.(Deploy your smart contract by using truffle)
Type
$ nvm use 10.16.0
to come back to node v10.16.0 after using truffle.
⚠ 현재 버전이 5보다 낮은 경우 트러플 버전 5를 설치하세요. $ sudo npm install -g truffle@5
Last updated