> For the complete documentation index, see [llms.txt](https://archive-ko.docs.klaytn.foundation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://archive-ko.docs.klaytn.foundation/content/dapp/tutorials/count-dapp/1.-environment-setup.md).

# 1. Environment Setup

> **\[MUST] For this tutorial, you must follow the versions specified on the** [**first page**](https://docs.klaytn.foundation/dapp/tutorials/count-dapp#testing-environment) **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) 설치 <a href="#id-1-install-node-js-npm" id="id-1-install-node-js-npm"></a>

* 공식 사이트에서 Node.js (npm)을 다운로드하세요: <https://nodejs.org/>
* 다운로드 파일을 클릭하여 패키지를 설치하세요.
* 터미널 창에 `$ node --version`을 입력하여 `node`가 잘 설치되었는지 확인하세요.

  ```
  v10.16.0
  ```

⚠ 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)](https://github.com/nvm-sh/nvm)를 사용하세요.

## 2) 트러플 설치 <a href="#id-2-install-truffle" id="id-2-install-truffle"></a>

트러플은 스마트 컨트랙트 파일을 컴파일하고 배포하기 위한 훌륭한 툴입니다.

> 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`
* 터미널 창에 `$ sudo npm install -g truffle`을 입력하여 트러플을 설치하세요.
* 터미널 창에 `$ truffle version`을 입력하여 `truffle`이 잘 설치되었는지 확인하세요.
* (**Deploy your smart contract by using truffle**)
* Type `$ nvm use 10.16.0` to come back node v10.16.0 after using truffle.

⚠ 현재 버전이 5보다 낮은 경우 트러플 버전 5를 설치하세요. `$ sudo npm install -g truffle@5`
