---
description: Quick start your project using Mantis.
---

# Quick Start

### Installation

Navigate to your root folder **`(i.e. mantis-material-react)`**

```
c:\>cd mantis-material-react
```

Install Packages by **npm** or **yarn** as per your preferences. Here we are using **`yarn`** package manager.

```bash
c:\mantis-material-react> yarn
```

{% hint style="warning" %}
If you are using npm, please use **npm i --legacy-peer-deps**
{% endhint %}

{% hint style="info" %}
**We would recommend yarn over npm**. Why? see this: [https://www.whitesourcesoftware.com/free-developer-tools/blog/npm-vs-yarn-which-should-you-choose/](https://www.whitesourcesoftware.com/free-developer-tools/blog/npm-vs-yarn-which-should-you-choose/)
{% endhint %}

### Start

After package installation, you can start your app by using **`yarn start`** command

```bash
c:\mantis-material-react> yarn start
```

For nextJS use **`yarn dev`** command

```bash
c:\mantis-material-react> yarn dev
```

This will start your local server at **`http://localhost:3000`** Also, your terminal shows the following.

```javascript
Compiled successfully!

You can now view mantis-material-react in the browser.

Local:            http://localhost:3000    
On Your Network:  http://192.168.29.77:3000

Note that the development build is not optimized.
To create a production build, use yarn build.
```

### Build & Deploy

This might be too early to deploy but it is always good to know how to deploy.

To build your app in production use **`yarn build`** command

```javascript
c:\mantis-material-react> yarn build
or
c:\mantis-material-react> npm run build
```

## Troubleshooting

1. An issue in the next JS production build

<figure><img src="https://867443238-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUXeKso4zA5CXA5yLnwuz%2Fuploads%2FUbXwhUNtRtHXFJIkuB5w%2FScreenshot%202022-11-17%20202925.png?alt=media&#x26;token=2fff5963-53f7-4c70-aad1-78a3e30fa438" alt=""><figcaption><p>next js build issue</p></figcaption></figure>

**Cause:** [https://github.com/vercel/next.js/discussions/30468](https://github.com/vercel/next.js/discussions/30468)

**Solution:** Install the missing software from here: [https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170](https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170)

### Deploy for your live site

Change the base URL with your domain and build your application.

You can control this with the `homepage` field in your **`package.json`**

{% code title="package.json" %}
```javascript
"homepage": "http://example.com"
```
{% endcode %}

{% hint style="info" %}
**You’ll need to have Node v12.x.x or later on your local development machine** (but it’s not required on the server). You can use [nvm](https://github.com/creationix/nvm#installation) (macOS/Linux) or [nvm-windows](https://github.com/coreybutler/nvm-windows#node-version-manager-nvm-for-windows) to easily switch Node versions between different projects.
{% endhint %}
