Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pbkdf2 exception (TypeError: createHmac is not a function) in nativescript 5.1.0 / Sidekick 1.14.1 #58

Open
chinghunglai opened this issue Jan 2, 2019 · 0 comments

Comments

@chinghunglai
Copy link

When my execution goes to this line
pbkdf2.pbkdf2Sync(...)
image
(npm i pbkdf2 already)

Will appear exception
TypeError: createHmac is not a function
image

Following the callstack, seeing that this function should come from here
require('crypto').createHmac
image

Try to solve this problem with nativescript-nodeify, execute
tns plugin add nativescript-nodeify

The result rebuild appears (in the sidekick console interface)
Error is: Cannot find module 'E:\xweb4\nativescript\ChinFirstApp\platforms\android\app\src\main\assets\app\tns_modules\nativescript-nodeify\patch-npm-packages.js'.
image

Is there a way to make pbkdf2.pbkdf2Sync work in the nativescript-vue (android) environment?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant