New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EventEmitter Module doesn't exist Error #51
Comments
临时解决方案: |
But How can I modify in native library?? |
@magicismight Please make your root siblings module work with RN 0.48+, so we don't have to fork your stuff and create confusion. It will also be the answer to this bug report :) |
For the non chinese folks like me, @zylibin solution worked for me: Find the file And replace line: |
Those suggestions are no solutions, as such changes get overwritten on the next update...so please be aware of that and stop propagating such mess....
… On 29 okt. 2017, at 19:06, Kevin Habich ***@***.***> wrote:
For the non chinese folks like me, @zylibin <https://github.com/zylibin> solution worked for me:
Find the file node_modules/react-native-root-siblings/lib/AppRegistryInjection.js
And replace line: import EventEmitter from 'react-native/Libraries/EventEmitter/EventEmitter';
With import EventEmitter from 'react-native/Libraries/vendor/emitter/EventEmitter';
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#51 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AA5fKcpsPS27kmf-v2fRzxJeh54FgvUHks5sxL67gaJpZM4P7mas>.
|
please use my fork in your package.json, this might be the most easy solution, just a work around: "react-native-root-toast": "github:pilipa-cn/react-native-root-toast#v2.2.0" |
Is there any official fix for this? |
No, like @beansoftapp offered, and what more people are doing, which leads to a lot of (unmaintained) forks: fork your own, or use somebody else's fork (like @beansoftapp's) That is why, ultimately, most open source advocates will gently keep nudging the original maintainer to update the package. So pretty please @magicismight ? |
I totally agree with @Morriz, so i'd like to talk how to fix this issue without touch the original source code at all. This bug occured as the author has specific the dependencies like this:
so the ^ will not lock the version of react-native-root-siblings, but the author released another new version of react-native-root-siblings which only works on latest react native. If you are using RN 0.46 ~ 0.48, you can run yarn first, then edit the yarn.lock file, and commit this file to your code base and other team member will using the same version as you, they just need do run a yarn. Now search and edit version number to this:
in package.json: |
That's a nice hack iyam, the best so far ;)
Don't forget about it tho: you are then using a hack to use that version, so make sure to always be aware of that when ugrading your `yarn.lock`. Not ideal.
|
For react-native >= 0.47 you can use react-native-root-toast@2.2.0, or using 1.2.1 for lower version. |
@magicismight so it might be kindly enough for you to add supported RN version range in the readme file. In fact this issue was first found after Nov 25, our CI breaks nightly build, after that I added yarn.lock file to our code base. |
Any proper solution found? |
I get following error when try to add the toast.
Please help out.
The text was updated successfully, but these errors were encountered: