react_native安装解决方案

Unable to resolve module `AccessibilityInfo` from `xxx\node_modules\react-native\Libraries\
react-native\react-native-implementation.js`: Module does not exist in the module map

This might be related to https://github.com/facebook/react-native/issues/4968
To resolve try the following:
  1. Clear watchman watches: `watchman watch-del-all`.
  2. Delete the `node_modules` folder: `rm -rf node_modules && npm install`.
  3. Reset Metro Bundler cache: `rm -rf $TMPDIR/react-*` or `npm start -- --reset-cache`.  
  4. Remove haste cache: `rm -rf $TMPDIR/haste-map-react-native-packager-*`.

  在当前项目下:

1、npm install --save react-native@0.55.4

2、修改package.json 将react-native 0.56.0 修改为0.55.4

3、rm -rf node_modules && npm install

4、npm install --save-dev babel-preset-react-native@2.1.0

 

posted @ 2018-07-18 19:32  tutu_python  阅读(211)  评论(0)    收藏  举报