Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/react-native/7.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 找不到模块';warnOnce';_React Native_Babel Loader - Fatal编程技术网

React native 找不到模块';warnOnce';

React native 找不到模块';warnOnce';,react-native,babel-loader,React Native,Babel Loader,当我将react本机版本升级到0.59.5,并运行webpack在同一文件夹app中为我的web app创建捆绑包时,我收到此错误 Module build failed (from ./node_modules/babel-loader/lib/index.js): Error: Cannot find module 'warnOnce' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:6

当我将react本机版本升级到0.59.5,并运行webpack在同一文件夹app中为我的web app创建捆绑包时,我收到此错误

  Module build failed (from ./node_modules/babel-loader/lib/index.js):
  Error: Cannot find module 'warnOnce'
  at Function.Module._resolveFilename 
  (internal/modules/cjs/loader.js:603:15)

我不明白这个警告在哪里用过一次,我怎样才能修复它?有人面临同样的问题吗?我对缓存进行了清理,但它仍然不工作

模块中添加
解析器
。在
metro.config.js中导出
,并确保它看起来像下面这样

const blacklist = require('metro-config/src/defaults/blacklist');

module.exports = {
  resolver: {
    blacklistRE: blacklist([
      /node_modules\/.*\/node_modules\/react-native\/.*/,
    ])
  },
  transformer: {
    getTransformOptions: async () => ({
      transform: {
        experimentalImportSupport: false,
        inlineRequires: false,
      },
    }),
  },
};