esbenp / react-native-clean-form

Easy react-native forms using bootstrap-like syntax with redux-form+immutablejs integration. Styled using styled-components
http://esbenp.github.io/2017/01/06/react-native-redux-form-immutable-styled-components/
MIT License
478 stars 76 forks source link

install does not work with latest react-native #36

Open lionhive opened 7 years ago

lionhive commented 7 years ago

I tried installing today using a fresh project: $ react-native -v react-native-cli: 2.0.1 react-native: n/a - not inside a React Native project directory

$ react-native init ReduxFormsTest $ cd ReduxFormsTest $ react-native run-ios $ npm i -s react-native-clean-forms (SIMULATOR ERROR)

If I now embed the sample code and reload the simulator I get this error:

Unable to resolve modulereact-native-clean-form/redux-formfrom/Users/tomasvykruta/Documents/playground/ReduxFormsTest/forms_test.js`: Module does not exist in the module map or in these directories: /Users/tomasvykruta/Documents/playground/ReduxFormsTest/node_modules/react-native-clean-form , /Users/tomasvykruta/Documents/playground/node_modules/react-native-clean-form

This might be related to https://github.com/facebook/react-native/issues/4968 To resolve try the following:

  1. Clear watchman watches: watchman watch-del-all.
  2. Delete the node_modules folder: rm -rf node_modules && npm install.
  3. Reset packager cache: rm -fr $TMPDIR/react-* or npm start --reset-cache.

RCTFatal -[RCTBatchedBridge stopLoadingWithError:] 25-[RCTBatchedBridge start]_block_invoke_2 _dispatch_call_block_and_release _dispatch_client_callout _dispatch_main_queue_callback_4CF CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE CFRunLoopRun CFRunLoopRunSpecific GSEventRunModal UIApplicationMain main start 0x0

Next I install redux-forms: $ npm i -s redux-form ` Now I get this new error: Unable to resolve module react-native-clean-form/redux-form from /Users/tomasvykruta/Documents/playground/ReduxFormsTest/forms_test.js: Module does not exist in the module map or in these directories: /Users/tomasvykruta/Documents/playground/ReduxFormsTest/node_modules/react-native-clean-form , /Users/tomasvykruta/Documents/playground/node_modules/react-native-clean-form

This might be related to https://github.com/facebook/react-native/issues/4968 To resolve try the following:

  1. Clear watchman watches: watchman watch-del-all.
  2. Delete the node_modules folder: rm -rf node_modules && npm install.
  3. Reset packager cache: rm -fr $TMPDIR/react-* or npm start --reset-cache.

RCTFatal -[RCTBatchedBridge stopLoadingWithError:] 25-[RCTBatchedBridge start]_block_invoke_2 _dispatch_call_block_and_release _dispatch_client_callout _dispatch_main_queue_callback_4CF CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE CFRunLoopRun CFRunLoopRunSpecific GSEventRunModal UIApplicationMain main start 0x0 `

I can wipe that directory: rm -rf node_modules/react-native-clean-form/redux-form

And I get the same error.

markusguenther commented 7 years ago

Thank you for the report, I try to test this soon. I haven`t upgraded my current project to 0.43, but will try this :)

markusguenther commented 7 years ago

I tried this now. If you use npm install https://github.com/esbenp/react-native-clean-form.git everything installs without your error. The npm package is not up to date. If you look at https://www.npmjs.com/package/react-native-clean-form there is version 0.1.0 instead of 0.3.0

markusguenther commented 7 years ago

Opened a pull request that is work in progress actually to update the example app to RN 0.43.3. The app worked but looks broken because the react dependency to the beta version is a problem and they worked on the ScrollView that is used by the Form component.

Try to fix that soon. But I am also a bit busy.

ajostergaard commented 7 years ago

I believe this is fixed.

I have:

aj$ react-native -v
react-native-cli: 2.0.1
react-native: 0.44.0

And installed react-native-clean-form today and got:

"react-native-clean-form": "^0.4.1",

And no issues. :)