Error: Module did not self-register couchbase

Error: Module did not self-register: ‘node_modules\couchbase\build\Release\couchbase_impl.node’.
Unable to resolve this error.

npm cache clean
delete node_modules and pacakage-lock.json file
npm install

follow these steps numerous times. Error remains same. Can anyone suggest a solution for this error.

Background info : node -v 14.11.6, npm -v 6.14.15, python3

Hi same issue here after update node (16.14.0 and npm 8.x
What causes this issue and how can we solve it

Welcome @Oliver_Lienhard and @sharmila_R – sorry you’re running into trouble.

I’m not that much of an expert here, but from what I see that indicates the prebuilt binary is, for some reason, not loadable. You might check a couple of things.

First, in node_modules/couchbase/build/Release you should find the built module. Run ldd/otool or like tools to see if there is something it might be missing?

Second, as a workaround, if you have a good set of build toolchain, maybe try building from source?
npm install "git+https://github.com/couchbase/couchnode.git#v3.2.4". What that may do is try to build the native code locally. If it fails, it’d be useful to put the gist into a log for us.

I’ve also pinged someone else who may be able to have a look.

Hi,

We are using Windows 10. Could you give me the equivalent command for ldd/otool in windows 10 and what does this command will do?

Hey @sharmila_R ,

Can you clarify what Node.js version you are using? I saw 14.11.6 in the first post here, but that version of Node.js doesn’t seem to actually exist? Additionally, I haven’t been able to reproduce this issue with the 14.11.0 version.

Cheers, Brett

I’m currently using Node.js 14.18.1

Hey @sharmila_R ,

We are unfortunately not able to reproduce the issue you are seeing locally. Would you be able to post the full log including your npm install couchbase step, along with the full log when you attempt to run the application when you encounter the self-registration error?

Cheers, Brett