Couchbase node sdk gives EVP_CIPHER_iv_length: symbol not found

I’m using a docker image of “node:18.10.0-alpine”, typescript 4.4.4 and couchbase node sdk 4.1.0 (same with 4.2.0). I already installed openssh by running,

apk add openssh,
apk add openssl.

But when I run “node server.js”, it gives this error,

throw e;
Error: Error relocating /usr/src/app/node_modules/couchbase/build/Release/couchbase_impl.node: EVP_CIPHER_iv_length: symbol not found
at Module._extensions…node (node:internal/modules/cjs/loader:1233:18)
at Module.load (node:internal/modules/cjs/loader:1027:32)
at Module._load (node:internal/modules/cjs/loader:868:12)
at Module.require (node:internal/modules/cjs/loader:1051:19)
at require (node:internal/modules/cjs/helpers:103:18)
at bindings (/usr/src/app/node_modules/bindings/bindings.js:112:48)
at Object. (/usr/src/app/node_modules/couchbase/dist/binding.js:160:40)
at Module._compile (node:internal/modules/cjs/loader:1149:14)
at Module._extensions…js (node:internal/modules/cjs/loader:1203:10)
at Module.load (node:internal/modules/cjs/loader:1027:32) {

Any idea about how to solve this problem?

PS: This is happening in node:17:xxx-alpine and node:19:xxx-alpine too.

1 Like

This is happening here too. With a normal node image (not alpine), it works fine.

1 Like

In node 17 they introduced --openssl-legacy-provider flag with introduction of new ssl library with node 17+. But I couldn’t find any solution using this flag.

Hi @samlk /@gustavolz – Unfortunately at the moment we do not support Node v18. We have created JSCBC-1152 to track the effort to add support. We also have DOC-11014 logged to update out documentation to provide better clarity on the versions a particular SDK version supports. We hope to add support within the next couple of release cycles, but don’t have a concrete timeline pinned down.

What you are running into is part of what we need to work through w.r.t. updating our prebuilt binaries. If you build the SDK from source you should not run into this problem. I was able to build the SDK locally and some basic scripts look to run without issues. I should note, however, that the build takes quite a while (at least via docker…took me ~4 hours on my machine).

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.