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.
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.
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 thepg-native
dependency.Please consider exporting the
native
feature in another compatible way.See: https://github.com/nodejs/node/issues/35859