brianc / node-pg-native

Native (C/C++) bindings to PostgreSQL with sync and async options.
247 stars 44 forks source link

Change native export method #97

Open avaly opened 4 years ago

avaly commented 4 years ago

Starting with node.js v14.13.0 CommonJS modules are parsed to detect their exports bindings. In this case pg is triggering the lazy loading of the pg-native dependency.

Please consider exporting the native feature in another compatible way.

See: https://github.com/nodejs/node/issues/35859

charmander commented 4 years ago

The error message will be fixed by brianc/node-postgres#2372. I don’t think skipping loading the module tree entirely will happen in 8.x; it’s hard to make backwards-compatible, for not much benefit.