react-native-env icon indicating copy to clipboard operation
react-native-env copied to clipboard

" Invalid directory /Users/node_modules/NativeModules"

Open nicholasalanbrown opened this issue 10 years ago • 5 comments

Using React Native 0.14.0, I get the following error:

2015-11-06 16:37:34.882 [error][tid:main][RCTBatchedBridge.m:436] Error while loading: Unable to resolve module NativeModules from /Users/nbrown/Source/<projectname>/react-native/node_modules/react-native-env/index.js: Invalid directory /Users/node_modules/NativeModules

Does this library need to be updated?

nicholasalanbrown avatar Nov 06 '15 21:11 nicholasalanbrown

+1

mtford90 avatar Nov 17 '15 10:11 mtford90

+1

RyGuyM avatar Nov 17 '15 22:11 RyGuyM

@RyGuyM Fixed in my PR, quick & simple change

mtford90 avatar Nov 17 '15 22:11 mtford90

@mtford90 i have the same inssue but whit other package, like crypto (tryng to use jwt-simple) do you have a solution?

matias-casal avatar Dec 22 '15 19:12 matias-casal

@Casy

Replace all require('NativeModules') with require('react-native').NativeModules in the codebase.

mtford90 avatar Dec 22 '15 23:12 mtford90