找不到模块:无法解析 './src/refreshableScrollView

费德里科·皮尔诺

在我的应用程序中安装 ant mobile 后,我尝试在我的应用程序中使用卡片组件,但是当我在 web 上或在我的手机上通过 expo 启动应用程序时,我总是收到相同的错误(错误的完整日志是:Module not成立:

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-plugin-import: expo install babel-plugin-import

然后babel.config.js像这样修改文件:

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

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

找不到模块:无法解析

找不到模块:错误:无法解析模块

找不到模块:错误:无法解析模块

找不到模块:错误:无法解析“ hammerjs”

找不到模块:错误:无法解析“ ./templates”

找不到模块:无法解析“./AppRoutes”

找不到模块:错误:无法解析“ fs”

找不到模块:错误:无法解析“ReactDOM”

找不到打字稿模块无法解析

找不到模块:无法解析“../file”

找不到模块:无法解析'./registerServiceWorker

找不到模块:无法解析“ readline”

找不到模块:错误:无法解析“ dropzone”

找不到REACTJS模块:无法解析“ axios”

找不到模块:无法解析“../components”

找不到模块:错误:无法解析模块“服务器”

找不到Webpack模块:错误:无法解析模块

“找不到模块:错误:无法解析模块'react / lib / ReactMount'”

找不到模块:错误:无法解析模块'***。jpg'

找不到模块:错误:无法解析模块“ fs”

MUI:找不到模块“找不到模块:错误:无法解析'时刻'”

找不到模块:无法解析“ @ material-ui / core / Container”

找不到模块:无法解析'@ material-ui / core / AppBar'

找不到模块:无法解析'react / lib / React'

找不到模块:无法解析“ material-ui / styles / colors”

错误:找不到模块:错误:无法解析“ @ angular / cdk / scrolling”

Angular 8 - 找不到模块:错误:无法解析“fs”

反应:找不到模块:无法解析“ react-html-parser”

找不到模块:无法解析“react-redux-form”