codler / react-native-keyboard-aware-scroll-view

A ScrollView component that handles keyboard appearance and automatically scrolls to focused TextInput.
https://www.npmjs.com/package/@codler/react-native-keyboard-aware-scroll-view
38 stars 16 forks source link

SyntaxError types in /lib/KeyboardAwareHOC.js #4

Closed victorfernandesraton closed 4 years ago

victorfernandesraton commented 4 years ago

I had this error when a starting my project

Failed to compile.

./node_modules/@codler/react-native-keyboard-aware-scroll-view/lib/KeyboardAwareHOC.js
SyntaxError: /home/victor/dev/storybook/node_modules/@codler/react-native-keyboard-aware-scroll-view/lib/KeyboardAwareHOC.js: Unexpected token (13:12)

  11 | } from 'react-native'
  12 | import { isIphoneX } from 'react-native-iphone-x-helper'
> 13 | import type { KeyboardAwareInterface } from './KeyboardAwareInterface'
     |             ^
  14 | 
  15 | const _KAM_DEFAULT_TAB_BAR_HEIGHT: number = isIphoneX() ? 83 : 49
  16 | const _KAM_KEYBOARD_OPENING_TIME: number = 250

i belive that error is relation to flow.js settings, but i don't fix this

cyyprezz commented 4 years ago

Hey the bug can be fixed. You must remove native-base then npm i native-base@2.13.12 or yarn add etc.. The dependency react-native-keyboard-aware-scroll-view": "0.9.1 was changed to @codler/react-native-keyboard-aware-scroll-view": "1.0.0 at the commit Fix #3179, #3183. There must be a bug in .@codler/react-native-keyboard-aware-scroll-view": "1.0.0**

victorfernandesraton commented 4 years ago

Hey the bug can be fixed. You must remove native-base then npm i native-base@2.13.12 or yarn add etc.. The dependency react-native-keyboard-aware-scroll-view": "0.9.1 was changed to @codler/react-native-keyboard-aware-scroll-view": "1.0.0 at the commit Fix #3179, #3183. There must be a bug in .@codler/react-native-keyboard-aware-scroll-view": "1.0.0**

it's worked

rabidkitten commented 3 years ago

Why is the solution to rollback native base? I am using native base 2.15.2 and I am having the problem. I shouldn't have to rollback native base to 2.13.12 in order for the code to start working... that isn't a solution.