# Fix tsconfig.json 'cannot find type definition file for node'

> Fix the tsconfig.json 'cannot find type definition file for node' error by installing the @types/node package as a dev dependency and reloading VS Code.

Author: [Flavio Copes](https://flaviocopes.com/about/) | Published: 2023-12-11 | Topics: [Tools](https://flaviocopes.com/tags/tools/) | Canonical: https://flaviocopes.com/fix-error-in-tsconfigjson-cannot-find-type-definition-file-for-node/

Run 

```css
npm i -D @types/node

#or

bun i -D @types/node
```

and restart VS Code (or reload the window)

If your `tsconfig.json` needs more fixing than that, I built a free [tsconfig generator](https://flaviocopes.com/tools/tsconfig-generator/) that builds a sensible config and explains every option.
