bug: pbkdf2 Unexpected token
adeyahya opened this issue ยท 2 comments
adeyahya commented
Hi! ๐
Firstly, thanks for your work on this project! ๐
Today I used patch-package to patch rn-nodeify@10.2.0
for the project I'm working on.
Here is the diff that solved my problem:
diff --git a/node_modules/rn-nodeify/pkg-hacks.js b/node_modules/rn-nodeify/pkg-hacks.js
index 25f4dbd..bca6d35 100644
--- a/node_modules/rn-nodeify/pkg-hacks.js
+++ b/node_modules/rn-nodeify/pkg-hacks.js
@@ -520,7 +520,7 @@ var hackers = [
hack: function (file, contents) {
if (isInReactNative(file)) return
- var fixed = contents.replace('process.version', '"' + process.version + '"')
+ var fixed = contents.replace(/\.+process\.version/g, '["' + process.version + '"]')
return contents === fixed ? null : fixed
}
This issue body was partially generated by patch-package.
vuongpsht commented
add this one to your package.json
"resolutions": { "**/pbkdf2": "3.1.1", "**/**/pbkdf2": "3.1.1", "**/**/**/pbkdf2": "3.1.1" },