db-migrate / pg

A postgresql driver for db-migrate.
Other
67 stars 51 forks source link

No such driver found #74

Closed ViniciusTxr closed 1 year ago

ViniciusTxr commented 1 year ago

I am getting the following error in version 1.3.0:

     Error: No such driver found, please try to install it via npm install db-migrate-pg or npm install -g db-migrate-pg
      at Object.exports.connect (node_modules/db-migrate/lib/driver/index.js:77:11)
      at Object.exports.connect (node_modules/db-migrate/connect.js:15:10)
      at /home/vinicius/Luizalabs/Projects/fat-copy/faturamento-api/node_modules/db-migrate/lib/commands/up.js:15:13
      at tryCatcher (node_modules/bluebird/js/release/util.js:16:23)
      at Promise._settlePromiseFromHandler (node_modules/bluebird/js/release/promise.js:547:31)
      at Promise._settlePromise (node_modules/bluebird/js/release/promise.js:604:18)
      at Promise._settlePromiseCtx (node_modules/bluebird/js/release/promise.js:641:10)
      at _drainQueueStep (node_modules/bluebird/js/release/async.js:97:12)
      at _drainQueue (node_modules/bluebird/js/release/async.js:86:9)
      at Async._drainQueues (node_modules/bluebird/js/release/async.js:102:5)
      at Immediate.Async.drainQueues [as _onImmediate] (node_modules/bluebird/js/release/async.js:15:14)
      at processImmediate (internal/timers.js:461:21)

Until version 1.2.2 it was working perfectly, but after new versions were published the lib is showing an error.

Any solution?

my node version: v12.22.12

wzrdtales commented 1 year ago

its your setup. There is nothing that changed around this at all. Something is wrong on your side. Just try setting it up again.

frazjp65 commented 1 year ago

@wzrdtales, are you sure? This is happening for me and was never an issue in the past.

ViniciusTxr commented 1 year ago

@wzrdtales why did you close the issue? The problem persists.

The error is not on my side, since until yesterday in version 1.2.2 everything was working perfectly. After the publication of the new versions (yesterday, May 4th) the library is no longer working.

My node version is v12.22.12

frazjp65 commented 1 year ago

I downgraded to 1.2.2 and it works again.

wzrdtales commented 1 year ago

@wzrdtales, are you sure? This is happening for me and was never an issue in the past.

yes sure. I tried to reproduce and its impossible to reproduce for me.

further its impossible that the version change causes this. the change was literally this:

https://github.com/db-migrate/pg/commit/24e231e01adf50cf260636cd50212d91e137b49d

and nothing else. This can't cause your described issues. please provide a full repository reproducing this issue

wzrdtales commented 1 year ago

My node version is v12.22.12

your node version is not supported. please upgrade to node 14, node 12 is long out of support and is a security hazard.

wzrdtales commented 1 year ago

please refer to https://github.com/nodejs/release#release-schedule for actually supported node versions, we don't support any node version that effectively shouldn't be used anymore since it doesn't receive any security patches anymore.

frazjp65 commented 1 year ago

I can confirm the Node version is the issue. I was running a pipeline job on v12 and it didn't work. I switched to 16 and it is working. Thanks for clarifying.

ViniciusTxr commented 1 year ago

humm, now based on the changelog of the commit I was able to understand the reason why it is not working, it is the Optional Chaining, since it was inserted from node v14.

Unfortunately I can't update my project to node v14+ because some important libs only work in v12-

I'm going to have to pin v1.2.2 of the library :(

Thanks @wzrdtales for sending the commit diff!!

ViniciusTxr commented 1 year ago

@wzrdtales I think it's a good practice to put this information on the minimum version of node both in the readme and in the package.json (engine -> node)

Because there is no such information anywhere in the project

wzrdtales commented 1 year ago

@ViniciusTxr upgrade your node version https://github.com/db-migrate/pg/issues/74#issuecomment-1535494402 already confirmed it. And please stay up to date for your own good. You're running software that makes you and your company attackable, which is irresponsible. We will never support software out of support since no one should run those, and we do not support insecure software. If you still decide to risk getting hacked, this is your choice, please stick to 1.2.4 then.

About the node version. Yes, I could put it. To be honest though. You can't expect anything to work if you still use windows xp.