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

Incompatibility with rn-nodeify #96

Open
speedytec opened this issue Apr 14, 2021 · 5 comments
Open

Incompatibility with rn-nodeify #96

speedytec opened this issue Apr 14, 2021 · 5 comments

Comments

@speedytec
Copy link

speedytec commented Apr 14, 2021

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)

@calvinmetcalf
Copy link
Contributor

looks like rn-nodeify fixed it on their end

@avinokur4
Copy link

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'

@WebTarantul
Copy link

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

@calvinmetcalf
Copy link
Contributor

have you upgraded rn-nodeify ?

@mkhalil49
Copy link

I fixed this by following this comment solution

tradle/rn-nodeify#102 (comment)

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

No branches or pull requests

5 participants