我有一个奇怪的反应本机项目运行react-navigation和redux。
我需要添加这个包:https://github.com/react-navigation/react-navigation-redux-helpers
我跑了:npm install react-navigation-redux-helpers
然后将此行添加到我的代码中:
import { createNavigationReducer } from 'react-navigation-redux-helpers';
现在每当我运行该项目时,它都无法使用此错误进行编译:
Module `@react-navigation/core` does not exist in the Haste module map
以前有人碰到这样的事吗?
我试过删除node_modules文件夹和package.lock文件。然后我尝试清除Watchman和NPM缓存
从react-navigation-redux-helpers
中删除node_modules文件夹和package.json
。
转到项目的根目录并删除当前节点模块并再次安装。
rm -rf node_modules npm install