报错信息
Unable to resolve module react-native-pager-view from /home/apex/.wp/expo/jsjs/node_modules/@ant-design/react-native/lib/carousel/index.js: react-native-pager-view could not be found within the project.
If you are sure the module exists, try these steps:
- Clear watchman watches: watchman watch-del-all
- Delete node_modules and run yarn install
- Reset Metro’s cache: yarn start --reset-cache
- Remove the cache: rm -rf /tmp/metro-*
22 | var _reactNative = require(“react-native”);
23 |
24 | var _reactNativePagerView = _interopRequireDefault(require(“react-native-pager-view”));
| ^
25 |
26 | var _style = require("…/style");
27 |
undefined Unable to resolve module react-native-pager-view from /home/apex/.wp/expo/jsjs/node_modules/@ant-design/react-native/lib/carousel/index.js: react-native-pager-view could not be found within the project.
解决办法
yarn add react-native-pager-view
重启项目,问题成功解决!
项目地址:
https://github.com/callstack/react-native-pager-view
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)