Reactjs Redux persist:无法解析模块'react native'`

Reactjs Redux persist:无法解析模块'react native'`,reactjs,typescript,react-native,redux,redux-persist,Reactjs,Typescript,React Native,Redux,Redux Persist,我试图在我的第三方NPM模块中使用redux persist(如果有帮助的话,它使用Typescript)。每当我试图在我的实际项目(这是一个完美工作的React本机应用程序)中使用我的第三方模块(本地符号链接)时,我都会遇到以下错误: error: bundling failed: Error: Unable to resolve module `react-native` from `path/to/my/3rd/party/module/node_modules/redux-persis

我试图在我的第三方NPM模块中使用
redux persist
(如果有帮助的话,它使用Typescript)。每当我试图在我的实际项目(这是一个完美工作的React本机应用程序)中使用我的第三方模块(本地符号链接)时,我都会遇到以下错误:

error: bundling failed: Error: Unable to resolve module `react-native` from 
`path/to/my/3rd/party/module/node_modules/redux-persist/lib/storage/index.native.js`:
Module `react-native` does not exist in the Haste module map
Redux persist声明它不需要React(正如它在自述文件中所说的“如果您正在使用React…”,这意味着它也可以在没有React/React Native的情况下使用),为什么我会遇到这样的错误

我尝试过的事情:

  • react
    (任何版本)作为对等依赖项添加到我的外部模块
  • react native
    (任何版本)作为对等依赖项添加到我的外部模块
  • react
    安装到我的外部模块
  • 安装
    react native
    到我的外部模块
  • 已尝试
    @next
    版本的
    redux persist
    ,该版本对React的依赖项有一些更改。我也读过,虽然我不知道该怎么办
我总是清除缓存,重新启动VScode和bundler等

尽管我还是犯了同样的错误。如何将redux persist正确集成到我的party npm包中(可能与React/React Native一起使用,也可能不一起使用)