Parse-SDK-JS: crypto-js:4.0.0 dependency crashes React Native app
Issue Description
crypto-js:4.0.0 dependency from parse:>2.11.0 is incompatible with react-native see this.
Steps to reproduce
Include a parse >2.11.0as a dependency on a react-native project.
Expected Results
To run app without error.
Actual Outcome
Application crashes with error:
Unable to resolve module `crypto` from `node_modules/crypto-js/core.js`: crypto could not be found within the project.
Environment Setup
- JS SDK
- JS SDK version: >2.11.0
- Application? (Browser, Node, React-Native, etc): React-Native
Logs/Trace
error: Error: Unable to resolve module `crypto` from `node_modules/crypto-js/core.js`: crypto could not be found within the project.
If you are sure the module exists, try these steps:
1. Clear watchman watches: watchman watch-del-all
2. Delete node_modules: rm -rf node_modules and run yarn install
3. Reset Metro's cache: yarn start --reset-cache
4. Remove the cache: rm -rf /tmp/metro-*
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 18 (9 by maintainers)
Commits related to this issue
- fix: crypto-js crashing React Native Closes: https://github.com/parse-community/Parse-SDK-JS/issues/1201 Moves crypto-js to optionalDependencies — committed to parse-community/Parse-SDK-JS by dplewis 4 years ago
- fix: crypto-js crashing React Native (#1218) Closes: https://github.com/parse-community/Parse-SDK-JS/issues/1201 Moves crypto-js to optionalDependencies — committed to parse-community/Parse-SDK-JS by dplewis 4 years ago
I’ll open a PR to downgrade crypto to 3.3.0 or does it work with 4.0.0?