diff --git a/docs/2.guide/1.concepts/8.typescript.md b/docs/2.guide/1.concepts/8.typescript.md index ffb934e1e7..a8723bc9c4 100644 --- a/docs/2.guide/1.concepts/8.typescript.md +++ b/docs/2.guide/1.concepts/8.typescript.md @@ -8,7 +8,7 @@ Nuxt 3 is fully typed and provides helpful shortcuts to ensure you have access t ## Type-checking -By default, Nuxt doesn't check types when you run `nuxi dev` or `nuxi build`, for performance reasons. However, you can enable type-checking at build or development time by installing `@types/node`, `vue-tsc` and `typescript` as devDependencies and either enabling [the `typescript.typeCheck` option in your `nuxt.config` file](/docs/api/configuration/nuxt-config#typescript) or [manually checking your types with nuxi](/docs/api/commands/typecheck). +By default, Nuxt doesn't check types when you run `nuxi dev` or `nuxi build`, for performance reasons. However, you can enable type-checking at build or development time by installing `vue-tsc` and `typescript` as devDependencies and either enabling [the `typescript.typeCheck` option in your `nuxt.config` file](/docs/api/configuration/nuxt-config#typescript) or [manually checking your types with nuxi](/docs/api/commands/typecheck). ```bash yarn nuxi typecheck diff --git a/docs/3.api/5.commands/typecheck.md b/docs/3.api/5.commands/typecheck.md index eef39ed27c..7f3c6cd7a7 100644 --- a/docs/3.api/5.commands/typecheck.md +++ b/docs/3.api/5.commands/typecheck.md @@ -18,5 +18,5 @@ Option | Default | Description This command sets `process.env.NODE_ENV` to `production`. To override, define `NODE_ENV` in a `.env` file or as a command-line argument. ::alert -You can also enable type-checking at build or development time by installing `@types/node`, `typescript` and `vue-tsc` as devDependencies and enabling [the `typescript.typeCheck` option in your `nuxt.config` file](/docs/api/configuration/nuxt-config#typescript). +You can also enable type-checking at build or development time by installing `typescript` and `vue-tsc` as devDependencies and enabling [the `typescript.typeCheck` option in your `nuxt.config` file](/docs/api/configuration/nuxt-config#typescript). :: diff --git a/packages/nuxt/package.json b/packages/nuxt/package.json index 4262edf79b..f8a4b8027f 100644 --- a/packages/nuxt/package.json +++ b/packages/nuxt/package.json @@ -109,6 +109,9 @@ "@types/hash-sum": "^1.0.0", "unbuild": "latest" }, + "peerDependencies": { + "@types/node": "^14.18.0 || ^16.10.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" + }, "engines": { "node": "^14.18.0 || ^16.10.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index cdfee34c88..71620d547a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -536,6 +536,9 @@ importers: '@nuxt/vite-builder': specifier: workspace:* version: link:../vite + '@types/node': + specifier: ^14.18.0 || ^16.10.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 + version: 18.15.11 '@unhead/ssr': specifier: ^1.1.25 version: 1.1.25