Skip to content

RN 0.50.1 StorageController.react-native.js Break #508

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ghost opened this issue Nov 16, 2017 · 1 comment · Fixed by #519
Closed

RN 0.50.1 StorageController.react-native.js Break #508

ghost opened this issue Nov 16, 2017 · 1 comment · Fixed by #519

Comments

@ghost
Copy link

ghost commented Nov 16, 2017

I've setup a new project with Parse, Mobx etc...

But I can't use Parse because I have this error

bundling failed: UnableToResolveError: Unable to resolve module react-native/Libraries/react-native/react-native.js from LONGPATH/node_modules/parse/lib/react-native/StorageController.react-native.js: Module does not exist in the module map

I've solve the problem when I have change this:

try {
	// for React Native 0.43+
	AsyncStorage = require('react-native/Libraries/react-native/react-native-implementation')
		.AsyncStorage;
} catch (error) {
	AsyncStorage = require('react-native/Libraries/react-native/react-native.js').AsyncStorage;
}

to this

try {
	// for React Native 0.43+
	AsyncStorage = require('react-native/Libraries/react-native/react-native-implementation')
		.AsyncStorage;
} catch (error) {
	// AsyncStorage = require('react-native/Libraries/react-native/react-native.js').AsyncStorage;
}

I've try to debug and my the application don't go to the catch but it break the code ...

I use react native 50.1

@ghost ghost changed the title Error with new react native application: RN 0.50.1 StorageController.react-native.js Break Nov 16, 2017
@mcwebb
Copy link

mcwebb commented Nov 17, 2017

Duplicate of #496.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant