RN启动报错[Workarounds] Packager unable to resolve module from /Users/node_modules/

github:https://github.com/facebook/react-native/issues/4968

也在说这问题

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-*`.

 

我的情况是这样的,安装运行没有问题然后开始写代码,第二天打开,报错看提示说要删node_modules等等操作

我个人推测的原因:

我把react-navigation引入了没有使用第二天过来运行报错

解决方法

引入注释掉就可以了