EddyVerbruggen / EddyVerbruggen/nativescript-nodeify

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

Open
#58 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
93
Forks
27
PR merge metrics
No merged PRs in 30d

Description

When my execution goes to this line
`pbkdf2.pbkdf2Sync(...)`
![image](https://user-images.githubusercontent.com/3668020/50583052-fe457880-0ea1-11e9-999b-97a52ade27fc.png)
(`npm i pbkdf2` already)

Will appear exception
`TypeError: createHmac is not a function`
![image](https://user-images.githubusercontent.com/3668020/50583003-a444b300-0ea1-11e9-9b9e-7ed61a353c27.png)

Following the callstack, seeing that this function should come from here
`require('crypto').createHmac`
![image](https://user-images.githubusercontent.com/3668020/50583120-6d22d180-0ea2-11e9-9c66-dcc5f39e5761.png)

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](https://user-images.githubusercontent.com/3668020/50582993-90994c80-0ea1-11e9-8c3f-adb45c8f0cec.png)

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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.