Closed theGrape1337 closed 1 year ago
I fixed it. It was a problem with compatibility with nodes crypto package. Solved it by adding this to your metro.config.js file
/**
* Metro configuration for React Native
* https://github.com/facebook/react-native
*
* @format
*/
module.exports = {
transformer: {
getTransformOptions: async () => ({
transform: {
experimentalImportSupport: false,
inlineRequires: true,
},
}),
},
//add this
resolver: {
extraNodeModules: require('node-libs-react-native'),
},
};
And then run
npm install node-libs-react-native
Im new to cryptography and just wanted to try this package out in React Native but it only returns "TypeError: undefined is not a function". So two questions:
1) is this package compatible with RN? I thought it would be since its browser compatible.
2) If it is compatible then what am I missing? Example:
Response: