knex: Build - Warning messages about missing mysql and sqlite peer

Environment

Knex version: 0.20.1 Database + version: Postgresql OS: Mac, Linux

Feature discussion / request

  1. Explain what is your use case

We are using knex with Postgresql, but somehow on “npm install knex” we get the following messages:

npm WARN knex@0.20.1 requires a peer of mssql@^5.1.0 but none is installed. You must install peer dependencies yourself.
npm WARN knex@0.20.1 requires a peer of mysql@^2.17.1 but none is installed. You must install peer dependencies yourself.
npm WARN knex@0.20.1 requires a peer of mysql2@^1.7.0 but none is installed. You must install peer dependencies yourself.
npm WARN knex@0.20.1 requires a peer of sqlite3@^4.1.0 but none is installed. You must install peer dependencies yourself.

This seems to have been there since 0.20, but not sure.

We are using postgres and those are warning messages for the developers or the DevOps on the projects. Also, not sure why I am not getting similar messages for all other databases supported by Knex that I am am not using (and do not have the peer driver installed).

  1. Suggestion

I can see the value of those types of warning, but the confusion and extra noise it creates for everybody not using mysql or sqlite might not make it worthwhile.

If the decision is to keep those messages, we will have to make a documentation note for our dev / devops and hope they read or find it when they get confused about these messages. Not the end of the world, but another thing to educate dev and devops. Also, in this case, I would love to understand why we get those messages only for mysql and sqlite, and not Oracle for example, which I assume knex needs a “driver / peer package” as well.

Side Note: We are a big fan of Knex.js, so, we will respect whatever decision but just wanted to voice our point of view.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 20

Most upvoted comments

@jeremychone @mastermatt OK, it could be that it needed to be published with newer npm. Can you please try 0.20.2 and see if you still get it?

@alasdairhurst Thanks, I’ll take a look at what changed since then.

Yep, same here, knex 0.20.2 with npm 6.13.0 does not print the warnings. Thank you!!!