# Next.js - Set up with TypeScript

## Steps

1. Create `tsconfig.json`
2. Install the required packages
3. Converting files from `.js` to `.tsx`&#x20;

#### 1. Create an empty `tsconfig.json` file in the root of your project:

```
touch tsconfig.json
```

#### 2. Install the required packages

```
yarn add --dev typescript @types/react @types/react-dom @types/node
```

{% hint style="danger" %}
A file named `next-env.d.ts` will be created in the root of your project. This file ensures Next.js types are picked up by the TypeScript compiler. **You cannot remove it**, however, you can edit it (but you don't need to).
{% endhint %}
