pbkdf2 icon indicating copy to clipboard operation
pbkdf2 copied to clipboard

Incompatibility with rn-nodeify

Open speedytec opened this issue 4 years ago • 5 comments
trafficstars

When i Run my postinstall script, in a previous version of pbkdf2 (3.0.8), the rn-nodeify replace the "process.version" with the current version of node
MicrosoftTeams-image (2) In the actual version the rn-nodeify brokes the code MicrosoftTeams-image (3)

speedytec avatar Apr 14 '21 00:04 speedytec

looks like rn-nodeify fixed it on their end

calvinmetcalf avatar Apr 14 '21 13:04 calvinmetcalf

Got the same problem here STR:

  1. rn-nodeify --install --hack --yarn
  2. react-native bundle --entry-file index.tsx --platform ios --dev false --bundle-output ios/main.jsbundle --assets-dest ios
error SyntaxError: /Users/test/node_modules/parse-asn1/node_modules/pbkdf2/lib/default-encoding.js: Unexpected token (5:36)

  3 | if (global.process && global.process.browser) {
  4 |   defaultEncoding = 'utf-8'
> 5 | } else if (global.process && global."v15.6.0") {
    |                                     ^
  6 |   var pVersionMajor = parseInt("v15.6.0".split('.')[0].slice(1), 10)
  7 |
  8 |   defaultEncoding = pVersionMajor >= 6 ? 'utf-8' : 'binary'. Run CLI with --verbose flag for more details.
SyntaxError: /Users/test/node_modules/parse-asn1/node_modules/pbkdf2/lib/default-encoding.js: Unexpected token (5:36)

  3 | if (global.process && global.process.browser) {
  4 |   defaultEncoding = 'utf-8'
> 5 | } else if (global.process && global."v15.6.0") {
    |                                     ^
  6 |   var pVersionMajor = parseInt("v15.6.0".split('.')[0].slice(1), 10)
  7 |
  8 |   defaultEncoding = pVersionMajor >= 6 ? 'utf-8' : 'binary'

avinokur4 avatar Apr 14 '21 21:04 avinokur4

Same issue after node_modules/.bin/rn-nodeify --install --hack

WebTarantul avatar Apr 15 '21 14:04 WebTarantul

have you upgraded rn-nodeify ?

calvinmetcalf avatar Apr 15 '21 17:04 calvinmetcalf

I fixed this by following this comment solution

https://github.com/tradle/rn-nodeify/issues/102#issuecomment-817284939

mkhalil49 avatar Apr 15 '21 23:04 mkhalil49