# 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) Install Node.js (npm) <a href="#id-1-install-node-js-npm" id="id-1-install-node-js-npm"></a>

* Download Node.js (npm) from the official site: <https://nodejs.org/>
* Install the package by clicking the download file.
* Type `$ node --version` in your terminal to verify `node` has been successfully installed.

  ```
    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. Reinstall the node or use [NVM (Node Version Manager)](https://github.com/nvm-sh/nvm) to set up a stable environment.

## 2) Install Truffle <a href="#id-2-install-truffle" id="id-2-install-truffle"></a>

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 verify `truffle` 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.

⚠ If the version is lower than 5, Install the truffle version 5.\
`$ sudo npm install -g truffle@5`


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://archive-docs.klaytn.foundation/content/dapp/tutorials/klaystagram/1.-environment-setup.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
