Skip to content

Comments

fix(deps): include @types/node as a peer dependency#4108

Merged
wellwelwel merged 1 commit intosidorares:masterfrom
wellwelwel:peer
Feb 20, 2026
Merged

fix(deps): include @types/node as a peer dependency#4108
wellwelwel merged 1 commit intosidorares:masterfrom
wellwelwel:peer

Conversation

@wellwelwel
Copy link
Collaborator

@wellwelwel wellwelwel commented Feb 20, 2026

Closes #3086, Closes #3575.

Although it is documented, it's common not to install MySQL2 using the documentation, but directly with "npm i mysql2". So this PR ensures that @types/node is included as a peer dependency by installing MySQL2.


Related

node-mysql2/README.md

Lines 85 to 91 in c4efc90

If you are using TypeScript, you will need to install `@types/node`.
```bash
npm install --save-dev @types/node
```
> For TypeScript documentation and examples, see [here][docs-typescript-docs].

# Using MySQL2 with TypeScript
## Installation
```bash
npm install --save mysql2
npm install --save-dev @types/node
```
> The `@types/node` ensure the proper interaction between **TypeScript** and the **Node.js** modules used by **MySQL2** (_net_, _events_, _stream_, _tls_, etc.).
:::info
Requires **TypeScript** `>=4.5.2`.
:::

@wellwelwel wellwelwel added the dependencies Pull requests that update a dependency file label Feb 20, 2026
@codecov

This comment was marked as off-topic.

@wellwelwel wellwelwel marked this pull request as ready for review February 20, 2026 13:16
@wellwelwel wellwelwel merged commit 5f8ac97 into sidorares:master Feb 20, 2026
100 checks passed
@wellwelwel wellwelwel deleted the peer branch February 20, 2026 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Connection.query() lacks typings types are broken

1 participant