knex: Unhandled rejection Error: Cannot find module 'pg-native'

When I try to use hash properties , it throws an error

Unhandled rejection Error: Cannot find module ‘pg-native’

db('test').where({'id' : 1, 'name' : 'blabla'})     
                             .first('*').then(function(value){ console.log(value) });

When I change it like below, it works. Whats the problem ?


db('test').where('id',  1)
             .andWhere('name', 'blabla')        
             .first('*').then(function(value){ console.log(value) });

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 22 (13 by maintainers)

Most upvoted comments

Getting this message with knex 0.15.2

@tahv0 please provide also some code for reproduction if you think that is a bug.

I made some more research and my issue were not related to this library. Sorry for opening this thread for nothing.

it will be released later today. What does 0.11.3 say? Actually changes in 0.11.4 is just to fix how that behave inside transaction so 0.11.3 could work too.

installing pg-native won’t fix the problem, it is just hiding one symptom. Query you mention should not cause that error though. This should be fixed in 0.11.4 which will be out later today.