You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import{Client}from'pg-native'constclient=newClient();client.connect(function(err){if(err)throwerrclient.query('SELECT NOW() AS the_date',function(err,rows){if(err)throwerrconsole.log(rows[0].the_date)//Tue Sep 16 2014 23:42:39 GMT-0400 (EDT)})})
when run
bun run index.ts
Bun show this error:
107 | return opts[p] || p;
108 | })
109 | );
110 | tries.push(n);
111 | try {
112 | b = opts.path ? requireFunc.resolve(n) : requireFunc(n);
^
error: The module 'addon' was compiled against a different Node.js ABI version using NODE_MODULE_VERSION 131. This version of Bun requires NODE_MODULE_VERSION 127. Please try re-compiling or re-installing the module.
at bindings (D:\test-bun\node_modules\bindings\bindings.js:112:48)
at <anonymous> (D:\test-bun\node_modules\libpq\index.js:1:18)
at <anonymous> (D:\test-bun\node_modules\pg-native\index.js:1:5)
The direct cause of this issue is that some part of the package manager doesn't pass through our NODE_MODULE_VERSION, so pg-native is getting built or downloaded for a different Node.js version than the one Bun's V8 C++ API implementation targets. We should fix that, but fixing that won't make pg-native work because it uses several V8 APIs that Bun doesn't implement. You can track our progress on V8 APIs in #4290.
What version of Bun is running?
1.2.2+c1708ea6a
What platform is your computer?
Windows 11 x64
What steps can reproduce the bug?
Hi, I want use "pg-native" module in a Bun project, eg:
package.json
index.ts
when run
Bun show this error:
Additional information
maybe correlate to #4290
The text was updated successfully, but these errors were encountered: