-
Notifications
You must be signed in to change notification settings - Fork 153
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
Cannot read property 'LENGTH_LONG' of undefined #43
Comments
Hi @gokulkulkarni1987, this means that the Snackbar object itself is undefined. Please make sure you've run |
Could you try running the example app and see if you spot any differences? Here's my successful output for
|
The example does work, I check my config with the config in this example and keep you posted. |
hi @cooperka thanks it worked. I had issue with react-native version, after updating to latest version it did work. Thanks for your support. |
Same problem using react-native 0.48.3 version and react-native-snackbar 0.4.1 version. Not sure how to resolve it as of yet... |
Hi @mattferrin, this error generally means the library wasn't linked properly or React Native can't find it. Can you please clear all your caches and try once more? Often something small gets in the way and the only solution is starting over. |
Hi @cooperka I have upgraded my react-native version to 0.49.3 and I have started the getting the issue yet again. :( Please find below the output of link,
please help me out. |
Hmm, I upgraded the example app to RN v0.49 and it all still seems to be working for me. It's likely still a cache issue; try cleaning everything, including Xcode derived data, watchman, and the React Packager. I run into these sorts of issues occasionally, most often because Xcode is storing all sorts of derived data in various places. You can search online for ways of cleaning it up (unfortunately it's not as simple as just running Clean or deleting your project). |
Tried everything, didn't work. But it works in fresh new project. Another one of those instances where the only fix is to create new project and then copy over, install, and link everything from scratch... Not the first time; not the last time. |
i'm having this issue when i'm running the tests. i've done everything but nothing seems to work. pls help |
By the way, I created a new project and copied everything over, installed, and linked everything from scratch. It didn't work :) haha. |
i got this error on IOS only "react": "^16.2.0", I linked the package
If i
|
Hmm, it looks like linking must have failed somehow even though it says it worked. This seems to happen to some people; try the manual linking solution here: #29 (comment) |
thanks @cooperka manually link remove the error ( https://facebook.github.io/react-native/docs/linking-libraries-ios.html ) |
Hi @emersonmoura, have you tried manually linking? |
Hi @cooperka, Any hints of the exact reason? This way I can investigate better. |
Hmm, it's strange that it says "unmet peer dependency [email protected]" in your second screenshot. This lib requires Have you tried installing with Yarn instead of npm? |
I also found it strange... Yes, I tried with Yarn. Result: Same red screen |
As a last resort, you could try starting with the official example app and progressively make it similar to your own app and see where it breaks. |
It could very well be related to your OS. If the example app doesn't work, something larger is likely wrong. Please post back if you find a solution! |
I had this issue on Android and did the following to solve it:
|
I got the same issue on iOS. I already linked it manually |
@itanhduy If you are using Pods. Go to ios folder then pod install. ^^ this should definitely go into README. Thanks for pointing out. |
The manual installation guide is here, linked from the README. Feel free to edit the wiki if it needs improvement! Thanks. |
After adding RNSnackBar.xcproj to Xcode (I recommend doing that manually instead of pod install), go to your app target -> Build Phrases -> Link Binary with Libraries and select RNSnackBar.a |
woah, this bug is a nightmare, these devs should apologize. tried a lot of stuff, but no thanks, abort mission! |
@masterkrang I spent the last day trying to add this component to my app and couldnt do it. Today I decided to try once more and was able to add it (my app is ios only). Those were my steps:
And it worked. Can you try these steps? |
You can try on Android
|
+1 |
Ok, it turns out that for me the issue was due to not restarting the simulator. :-) |
hello! this solution don't work with expo.. |
Readme says this library doesn't support expo.... hopefully will soon? |
Hi @bravadomizzou, it's not that Snackbar doesn't support Expo, it's the opposite -- Expo doesn't support Snackbar. You can eject if you want to use Snackbar, or ask Expo to build it into their set of available native components. |
I am facing the same issue. |
Getting the same error but in react-native-web only. |
manual linking also needs to be documented for iOS in readme, |
Working well with Expo. :) Snackbar.show({ |
@smitkaswala is there anything else i have to do? |
Use another package lmfao |
When I try to include and run I get the following error,
The text was updated successfully, but these errors were encountered: