tugrul / cryptian

Crypto suite for Node.js
MIT License
13 stars 2 forks source link

Getting "Module did not self-register" error in e2e tests #10

Open jdgrieco opened 5 months ago

jdgrieco commented 5 months ago

I'm getting

Error: Module did not self-register: 'node_modules/cryptian/build/Release/cryptian.node'.
❯ bindings node_modules/bindings/bindings.js:112:48
❯ Object.<anonymous> node_modules/cryptian/dist/index.js:53:41

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { code: 'ERR_DLOPEN_FAILED' }
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯

when I run, E2E Vitest test

Can you help with this?

tugrul commented 5 months ago

Hi @jdgrieco

Thank you for bringing the compatibility issue with the cryptian module to our attention. Based on your report, it appears that there might be a mismatch between the version of Node.js used to build the cryptian module and the version currently running in your environment. To address this, a straightforward solution is to remove the cryptian module dependency from your project (npm uninstall cryptian) and reinstall it (npm install cryptian). This process often resolves compatibility conflicts between the module and your current Node.js runtime. After reinstalling, please give your project another try to see if the issue persists.

If you encounter any further difficulties or have additional questions, feel free to reach out. We're here to assist you and ensure a smooth experience with the cryptian module.

jdgrieco commented 5 months ago

Hi @tugrul

Thanks for getting back to me quickly.

I did what you suggested, but unfortunately it didn't work.

I use "nvm", the project currently uses the lts/iron version, but I also tried with the lts/hydrogen version. I also tried removing the node_modules folder and reinstalling all the packages.

None of these attempts worked.