1

i'm trying to use this project

https://github.com/FaridSafi/react-native-gifted-listview

I'll write down the order processing.

  1. download the project.zip & unzipping

  2. in terminal, i used this command [npm install]

  3. and this [react-native run-android] & [react-native run-ios]

but i was failed to build this project.

open-ui-iMac:react-native-gifted-listview-master openobject$ react-native run-android Android project not found. Maybe run react-native android first?

open-ui-iMac:react-native-gifted-listview-master openobject$ react-native run-ios /Users/openobject/practice/react-native-gifted-listview-master/node_modules/promise/lib/done.js:10 throw err; ^

Error: ENOENT: no such file or directory, uv_chdir

at Error (native)
at process.chdir (/Users/openobject/practice/react-native-gifted-listview-master/node_modules/graceful-fs/polyfills.js:18:9)
at _runIOS (node_modules/react-native/local-cli/runIOS/runIOS.js:50:11)
at node_modules/react-native/local-cli/runIOS/runIOS.js:24:5
at tryCallTwo (/Users/openobject/practice/react-native-gifted-listview-master/node_modules/promise/lib/core.js:45:5)
at doResolve (/Users/openobject/practice/react-native-gifted-listview-master/node_modules/promise/lib/core.js:200:13)
at new Promise (/Users/openobject/practice/react-native-gifted-listview-master/node_modules/promise/lib/core.js:66:3)
at Array.runIOS (node_modules/react-native/local-cli/runIOS/runIOS.js:23:10)
at Object.run (node_modules/react-native/local-cli/cliEntry.js:95:3)
at Object.<anonymous> (/usr/local/lib/node_modules/react-native-cli/index.js:88:7)

i found a few solution of this.

they say "use this command"

rm -rf node_modules

rm -fr $TMPDIR/react-*

watchman watch-del-all

npm install --save react-native@latest

but it couldn't solve this problem

how i can solve this problem?

5
  • The step is not clear. Did you have react-native project prior to downloading this project? Note that this is not a full react-native project. This is a Component which can be installed to react-native's project to show a listview. Commented Jul 26, 2016 at 2:51
  • then, i just put this folder inside project folder? i'll try this. thanks Commented Jul 26, 2016 at 3:33
  • Nope. That wont work. I'll post steps on how to do it the right way. Commented Jul 26, 2016 at 3:35
  • oh, thanks! i really confuse to build react-native project. Commented Jul 26, 2016 at 3:40
  • try gradlew clean Commented May 29, 2020 at 4:36

1 Answer 1

1

You're trying to use a 3rd party React Native Component on your project. The right way to install and use the Component is as follow:

  1. Get inside your react-native project: cd yourProject
  2. On your terminal run the following code: npm install react-native-gifted-listview --save. This is the way to install Components. npm install component-name --save

  3. Import the installed component inside your page where you want to use: import GiftedListView from 'react-native-gifted-listview';

  4. Now you can use the component:

<GiftedListView
  rowView={this._renderRowView}
  onFetch={this._onFetch}
  firstLoader={true} 
  pagination={true} 
  refreshable={true} 
  withSections={false}
  refreshableTintColor="blue"
/>

Sign up to request clarification or add additional context in comments.

1 Comment

omg. this is work perfectly. really really thank you! Thank you become learn a lot of things.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.