WrathChaos / react-native-dynamic-search-bar

Medium Article: https://freakycoder.com/react-native-library-dynamic-search-bar-c03fea9fae36
MIT License
481 stars 52 forks source link

Expo version is not found #25

Closed swparkaust closed 4 years ago

swparkaust commented 4 years ago

I have followed the readme in a latest expo project and this is what I get:

yarn:

% yarn add WrathChaos/react-native-dynamic-search-bar#expo
yarn add v1.22.4
[1/4] 🔍  Resolving packages...
error Couldn't find match for "expo" in "refs/heads/dev,refs/heads/master,refs/pull/11/head,refs/pull/14/head,refs/pull/16/head,refs/pull/17/head,refs/pull/2/head,refs/pull/20/head,refs/pull/23/head,refs/pull/24/head,refs/pull/3/head,refs/pull/5/head,refs/pull/6/head,refs/pull/7/head,refs/pull/9/head,refs/tags/0.0.1,refs/tags/0.0.11,refs/tags/0.0.12,refs/tags/0.0.13,refs/tags/0.1.1,refs/tags/0.1.11,refs/tags/0.2.0,refs/tags/0.2.1,refs/tags/0.3.0,refs/tags/0.3.1,refs/tags/1.0.0,refs/tags/1.0.1" for "https://github.com/WrathChaos/react-native-dynamic-search-bar.git".
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

npm:

% npm i WrathChaos/react-native-dynamic-search-bar#expo
npm ERR! code 1
npm ERR! Command failed: git checkout expo
npm ERR! error: pathspec 'expo' did not match any file(s) known to git
npm ERR! 

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/parksunwoo/.npm/_logs/2020-04-22T06_44_13_258Z-debug.log
WrathChaos commented 4 years ago

Hello @swparkaust Can you try it with npm not yarn?

swparkaust commented 4 years ago

@WrathChaos I attached logs for both npm and yarn in OP. Seems like it is looking for the expo branch which is not there.

WrathChaos commented 4 years ago

Oh, you're right. I'm gonna fix it ASAP

WrathChaos commented 4 years ago

Hey again @swparkaust, Can you please try the latest version of the library with the following setup:

"tslib": "^1.11.1",
"@expo/vector-icons": "Kaushald4/vector-icons#master",
"react-native-dynamic-vector-icons": "WrathChaos/react-native-dynamic-vector-icons#expo",

It works on my environment, can you please try it and give me feedback. If it works, I will update the README, otherwise, I need to create an Expo version of the library.

swparkaust commented 4 years ago

@WrathChaos I created another blank Expo project (SDK 37), did npm i react-native-dynamic-search-bar (no expo), added above 3 lines from your post to package.json, and re-did npm install, which all were successful. (yarn fails here with something mentioning react-native link which I can't do in a managed Expo project so I just used npm.)

However, if I add the import and try to render the SearchBar, it either gets stuck at Downloading JavaScript bundle: 100.00%, or I get Invariant Violation: View config not found for name RCTSinglelineTextInputView (when running on an iOS device) / AndroidTextInput (when running on an Android).

The app runs back to normal once I remove the import and any reference to SearchBar, so I'd assume there must be some incompatibility (with the latest Expo SDK).

WrathChaos commented 4 years ago

Thank you so much @swparkaust, I'm going to make a fresh Expo version tonight :) I hope I can make it in one night.

swparkaust commented 4 years ago

@WrathChaos Sounds good. Please let me know once it's ready :) Thanks for creating the library, I am going to use it to implement an Apple Map-like bottom sheet for my app and your library looks very promising.

WrathChaos commented 4 years ago

Hi again @swparkaust, I've updated the expo branch :)

"@expo/vector-icons": "Kaushald4/vector-icons#master",
"react-native-dynamic-search-bar": "github:WrathChaos/react-native-dynamic-search-bar#expo",
"react-native-dynamic-vector-icons": "github:WrathChaos/react-native-dynamic-vector-icons#expo",

Please install them and try it :) Also, there is VERY basic example on the 'expo' branch. :)

Waiting for your review to update the documentation.

swparkaust commented 4 years ago

@WrathChaos It worked, just had to install two more dependencies as in readme: @freakycoder/react-native-helpers, react-native-vector-icons. Works great now in the latest expo.

WrathChaos commented 4 years ago

Ah yes, you need to install them. I will update the README then. Thank you for the feedback :) If you need anything or a new idea, please open an issue and we can make it happen :)