Parse-SDK-JS: RN crash with latest 1.10.1

Hello. This morning I’ve tried to update the package to the new release 1.10.1 but the packager returns this error:

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

I think it may be related to https://github.com/parse-community/Parse-SDK-JS/commit/e0ac255e18706b0a2610e66bbdee4d52b72a0eff


Edit: I’m using react-native: 0.49.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 1
  • Comments: 24 (13 by maintainers)

Commits related to this issue

Most upvoted comments

In the meantime, as a workaround you can add a postinstall bash script in package.json. Something like:

#!/bin/bash
PARSE_FILENAME='./node_modules/parse/lib/react-native/StorageController.react-native.js'

sed -i '' -e '16,21d' $PARSE_FILENAME
sed -i '' -e 's|let AsyncStorage|let AsyncStorage = require("react-native/Libraries/Storage/AsyncStorage")|g' $PARSE_FILENAME

(OS X, Parse 1.10.1, RN 0.50)

As things are turning I guess we’re gonna require the clients to set their async storage manually with something like Parse.setStorage()

For RN 0.50.2, found the solution in parse/lib/react-native/StorageController.react-native.js. Changed to the following:

captura de pantalla 2017-11-07 a las 5 31 14 p m

RN 0.49.3 Into ./node_modules/react-native/Libraries/Storage/AsyncStorage.js @flovilmart

Alright, i’ll work on a PR for this

man it drives me crazy, we’Ll let you guys provide the async storage library on your own no? That seems safer for the long run