Unable to resolve module `react-native/Libraries/EventEmitter/EventEmitter`

前端之家收集整理的这篇文章主要介绍了Unable to resolve module `react-native/Libraries/EventEmitter/EventEmitter`前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

React Native项目编译报错;遇到这个问题,很神奇,版本问题,Google了一下,最后解决了如下

原帖在这。 特此mark

change

import EventEmitter from 'react-native/Libraries/EventEmitter/EventEmitter';

to

import EventEmitter from 'react-native/Libraries/vendor/emitter/EventEmitter';

上面替换不是绝对,A改为B或者是B改为A

猜你在找的React相关文章