Closed sjkushwaha21 closed 2 months ago
@sjkushwaha21 What problem did this solve for you?
Hi @johnf,
Changing module.exports = { pick, omit }; To export { omit, pick };
Helped my issue.
Hi @johnf,
Changing module.exports = { pick, omit }; To export { omit, pick };
Helped my issue.
You could clean up your patch file by only including:
diff --git a/node_modules/react-native-vector-icons/lib/object-utils.js b/node_modules/react-native-vector-icons/lib/object-utils.js
index d03b55b..712b89b 100644
--- a/node_modules/react-native-vector-icons/lib/object-utils.js
+++ b/node_modules/react-native-vector-icons/lib/object-utils.js
@@ -17,4 +17,4 @@ const omit = (obj, ...keysToOmit) => {
}, {});
};
-module.exports = { pick, omit };
+export { omit, pick };
But, this looks more like a config issue you can solve here without having to patch, CJS/ESM thing. module.exports
is for CJS modules which are pulled into other code via require. export
is for ESM modules, which are pulled in via import.
It would be good to know what your issue was not just the fix.
Hi @johnf, @david-gettins
I am facing following issue. Please find the attachment as you requested.
@sjkushwaha21 Can you provide the code you are using? If you can provide an entire example repository that would be even better.
It looks like you are using RNVI via react-native-paper
and I'm wondering if there is something strange about how it's being used there?
The error you are seeing is quite strage.
@sjkushwaha21 If this is still an issue let me know and I'll reopen
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch
react-native-vector-icons@10.1.0
for the project I'm working on.Here is the diff that solved my problem:
This issue body was partially generated by patch-package.