react-native-scrollable-tab-view
react-native-scrollable-tab-view copied to clipboard
typeerror: this.scrollview.setpage is not a function
- [x] I have searched existing issues
- [x] I am using the latest scrollable tab view version
I want to upgrade my apps Expo SDK version, one by one from SDK 34. right now im in SDK ver 36.
First i get error viewpager, then update to latest ver is solved the problem. but now when i click tab this error is showing.
typeerror: this.scrollview.setpage is not a function
i try installed @react-native-community/viewpager in root module, but the error still showing. I even try create new ScrollableTabBar copy from your example folder, but the error still exist.
Steps to Reproduce
Expo SDK: 36.0 RN ver 0.61.4 react-native-scrollable-tab-view: 1.0.0
coding like in example folder
Expected Behavior
NO ERROR
Actual Behavior
typeerror: this.scrollview.setpage is not a function

i found that this function is from @react-native-community/viewpager. But when i check @react-native-community/viewpager in root node_modules or inside this library, was not existed. soooo.. i tried installed in root node modules and inside this library, but still error (ver 3.3.0) i tried NPM cache clean, same.
How to fix it?
i really dont understand, i uninstall and install again, now it works. i dont know that would be a problem if we install this than npm install all modules again????
UPDATE: oooooooooooohhhh, NPM version and github version is different version. i seeeeeeeeeee. the problem is new update in github version.
#1101 #1090
the same case
#1101 #1090
the same case
My solution is, put getNode() back. Or if you prefer use NPM version with viewpager 2.0
#1085
#1101 #1090 the same case
My solution is, put getNode() back. Or if you prefer use NPM version with viewpager 2.0
thanks it is solved.
I also received the same error recently, as mentioned in other issues the problem seems to be the depreciation of getNode by RN.
I used the same solution as commented by @brambang
And updated the package version to npm, changing in package.json "react-native-scrollable-tab-view ":" ^ 1.0.0"
to fix the dependency version.