I wrote an app with node.js, which uses the argon2 module for hashing passwords.
Running on my local (Windows) machine, everything was fine.
When I installed the app on my Linux server, I had errors installing the modules. However, once I updated the server to Node.js v12.18.3, reinstalling the modules completed successfully.
Unfortunately, when I attempted to actually run the app, I got the following error:
>$ node app.js
internal/modules/cjs/loader.js:1187
return process.dlopen(module, path.toNamespacedPath(filename));
^
Error: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /home/{CENSORED FOR PRIVACY}/node_modules/argon2/lib/binding/napi-v3/argon2.node)
at Object.Module._extensions..node (internal/modules/cjs/loader.js:1187:18)
at Module.load (internal/modules/cjs/loader.js:985:32)
at Function.Module._load (internal/modules/cjs/loader.js:878:14)
at Module.require (internal/modules/cjs/loader.js:1025:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (/home/{CENSORED FOR PRIVACY}/node_modules/argon2/argon2.js:9:56)
at Module._compile (internal/modules/cjs/loader.js:1137:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
at Module.load (internal/modules/cjs/loader.js:985:32)
at Function.Module._load (internal/modules/cjs/loader.js:878:14)
at Module.require (internal/modules/cjs/loader.js:1025:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (/home/{CENSORED FOR PRIVACY}/models/Users.js:2:16)
at Module._compile (internal/modules/cjs/loader.js:1137:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
at Module.load (internal/modules/cjs/loader.js:985:32)
Any ideas how to fix this?
I tried running:
LD_LIBRARY_PATH=/usr/local/lib64/:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH
as suggested here, but it did not help.