Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/ms-access/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
React native 未找到模块:无法解析“./src/refreshableScrollView”_React Native_Antd Mobile - Fatal编程技术网

React native 未找到模块:无法解析“./src/refreshableScrollView”

React native 未找到模块:无法解析“./src/refreshableScrollView”,react-native,antd-mobile,React Native,Antd Mobile,在我的应用程序中安装ant mobile后,我尝试在我的应用程序中使用卡组件,但当我在web或expo手机上启动应用程序时,我总是收到相同的错误。错误的完整日志为:未找到模块: Can't resolve './src/refreshableScrollView' in 'C:\Users\User\Desktop\AwesomeProject\node_modules\@bang88\react-native-ultimate-listview 如果需要idk,但我发布的每一条信息,有人知道

在我的应用程序中安装ant mobile后,我尝试在我的应用程序中使用卡组件,但当我在web或expo手机上启动应用程序时,我总是收到相同的错误。错误的完整日志为:未找到模块:

Can't resolve './src/refreshableScrollView' in 'C:\Users\User\Desktop\AwesomeProject\node_modules\@bang88\react-native-ultimate-listview

如果需要idk,但我发布的每一条信息,有人知道如何解决吗?

我最近也遇到了同样的问题,并且已经解决了这个问题

首先,您需要使用expo而不是npm安装ant mobile: expo install@ant design/react native

同时安装babel插件导入: expo安装babel插件导入

然后修改babel.config.js文件,如下所示:

module.exports = function(api) {
  api.cache(true);
  return {
    presets: ['babel-preset-expo'],
    plugins: [
      ['import', {libraryName: '@ant-design/react-native'}],
    ],
  };
};

我最近也遇到了同样的问题,并且已经解决了这个问题

首先,您需要使用expo而不是npm安装ant mobile: expo install@ant design/react native

同时安装babel插件导入: expo安装babel插件导入

然后修改babel.config.js文件,如下所示:

module.exports = function(api) {
  api.cache(true);
  return {
    presets: ['babel-preset-expo'],
    plugins: [
      ['import', {libraryName: '@ant-design/react-native'}],
    ],
  };
};