node-sodium icon indicating copy to clipboard operation
node-sodium copied to clipboard

Angular/typescript usage

Open grosch opened this issue 5 years ago • 6 comments

Are there examples of how to use this with angular?

grosch avatar Dec 03 '18 05:12 grosch

Not that I know of. Never used it in the browser.

On Mon, Dec 3, 2018 at 00:52 grosch [email protected] wrote:

Are there examples of how to use this with angular?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/paixaop/node-sodium/issues/143, or mute the thread https://github.com/notifications/unsubscribe-auth/AAT9XkF_2ZqiE-QE1HgpBc14DmuPW0xIks5u1LwygaJpZM4Y969E .

-- Do It Right or Don't Do It At All!

paixaop avatar Dec 03 '18 14:12 paixaop

After doing the npm install sodium I did my ng build but I get a bunch of errors like so:

ERROR in ./node_modules/sodium/lib/keys/dh-key.js Module not found: Error: Can't resolve '../../build/Release/sodium' in '/Users/scott/VoiceTalentBank/node_modules/sodium/lib/keys'

I'm doing this on macOS Mojave. During the install I saw a bunch of warnings about deprecated methods being called but it did succeed.

grosch avatar Dec 06 '18 07:12 grosch

The deprecations are from libsodium and should not cause issues. It seems that NG cannot find the binary module for sodium. Can you check the build directory under node sodium to see if it is there after node sodium install runs successfully?

paixaop avatar Dec 07 '18 17:12 paixaop

% find . -name libsodium.a
./node_modules/sodium/deps/libsodium/src/libsodium/.libs/libsodium.a
./node_modules/sodium/deps/build/lib/libsodium.a
% pushd node_modules/sodium/lib/keys
% ls ../../build/Release/
nothing.a    obj.target/  sodium.node* 

grosch avatar Dec 08 '18 02:12 grosch

I get the same errors. Any work around for using it with angular?

nachozt avatar Aug 23 '19 11:08 nachozt

Could these errors be related to issues #144 and #146?

rawr51919 avatar Jan 12 '20 22:01 rawr51919