GeekyAnts / vue-native-router

37 stars 24 forks source link

Sudden dependency issue errors breaking old navigation. #28

Closed Mgrmjp closed 4 years ago

Mgrmjp commented 4 years ago

`--` vue-native-router@0.1.1

+-- UNMET PEER DEPENDENCY react-navigation@3.13.0 | `-- react-navigation-drawer@1.4.0 `-- react-navigation-drawer@2.4.2

npm ERR! peer dep missing: react-navigation@^4.1.1, required by react-navigation-drawer@2.4.2 npm ERR! peer dep missing: react-navigation@^4.0.7, required by react-navigation-stack@1.10.3 npm ERR! peer dep missing: react-navigation@^4.1.1, required by react-navigation-tabs@2.8.2


That's what I'm getting. Perhaps updating expo is not a good idea when using Vue Native?

Mgrmjp commented 4 years ago

[Unhandled promise rejection: TypeError: subs is not a function. (In 'subs(payloadWithType)', 'subs' is undefined)] - node_modules\@react-navigation\core\lib\module\getChildEventSubscriber.js:1:1181 in emit * [native code]:null in forEach - node_modules\@react-navigation\core\lib\module\getChildEventSubscriber.js:1:1155 in emit - node_modules\@react-navigation\core\lib\module\getChildEventSubscriber.js:1:2426 in addListener$argument_1 - node_modules\@react-navigation\core\lib\module\getChildEventSubscriber.js:1:1181 in emit * [native code]:null in forEach - node_modules\@react-navigation\core\lib\module\getChildEventSubscriber.js:1:1155 in emit - node_modules\@react-navigation\core\lib\module\getChildEventSubscriber.js:1:2536 in addListener$argument_1 - node_modules\@react-navigation\native\src\createAppContainer.js:266:13 in dispatchActions * [native code]:null in forEach - node_modules\@react-navigation\native\src\createAppContainer.js:265:30 in dispatchActions * http://192.168.1.39:19001/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&minify=false&hot=false:135316:34 in componentDidMount$ - node_modules\regenerator-runtime\runtime.js:45:44 in tryCatch - node_modules\regenerator-runtime\runtime.js:271:30 in invoke - node_modules\regenerator-runtime\runtime.js:45:44 in tryCatch - node_modules\regenerator-runtime\runtime.js:135:28 in invoke - node_modules\regenerator-runtime\runtime.js:145:19 in Promise.resolve.then$argument_0 - node_modules\promise\setimmediate\core.js:37:14 in tryCallOne - node_modules\promise\setimmediate\core.js:123:25 in setImmediate$argument_0 - node_modules\react-native\Libraries\Core\Timers\JSTimers.js:146:14 in _callTimer - node_modules\react-native\Libraries\Core\Timers\JSTimers.js:194:17 in _callImmediatesPass - node_modules\react-native\Libraries\Core\Timers\JSTimers.js:458:30 in callImmediates * [native code]:null in callImmediates - node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:407:6 in callImmediates - node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:143:6 in guard$argument_0 - node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:384:10 in guard - node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:142:17 in guard$argument_0 * [native code]:null in flushedQueue * [native code]:null in invokeCallbackAndReturnFlushedQueue


This also started to pop up recently for unknown reason.

Mgrmjp commented 4 years ago

It seems that something new is installing a scoped package for @react-navigation by default and that causes issues. npm uninstall isn't working for that package so I have no clue how to get anything to work.

I tried to install normally using the documentation again and doesn't look like the global react-native-reanimated react-native-gesture-handler react-native-paper are being recognized in react-navigation files for some reason. 😴

Mgrmjp commented 4 years ago

[Unhandled promise rejection: TypeError: subs is not a function. (In 'subs(payloadWithType)', 'subs' \is undefined)] - node_modules\@react-navigation\core\lib\module\getChildEventSubscriber.js:1:1181 in emit * [native code]:null in forEach - node_modules\@react-navigation\core\lib\module\getChildEventSubscriber.js:1:1155 in emit - node_modules\@react-navigation\core\lib\module\getChildEventSubscriber.js:1:2426 in \addListener$argument_1 - node_modules\@react-navigation\core\lib\module\getChildEventSubscriber.js:1:1181 in emit * [native code]:null in forEach - node_modules\@react-navigation\core\lib\module\getChildEventSubscriber.js:1:1155 in emit - node_modules\@react-navigation\core\lib\module\getChildEventSubscriber.js:1:2536 in \addListener$argument_1 - node_modules\@react-navigation\native\src\createAppContainer.js:266:13 in dispatchActions * [native code]:null in forEach - node_modules\@react-navigation\native\src\createAppContainer.js:265:30 in dispatchActions * http://192.168.1.39:19001/node_modules%5Cexpo%5CAppEntry.bundle?\platform=android&dev=true&minify=false&hot=false:135284:34 in componentDidMount$ - node_modules\regenerator-runtime\runtime.js:45:44 in tryCatch - node_modules\regenerator-runtime\runtime.js:274:30 in invoke - node_modules\regenerator-runtime\runtime.js:45:44 in tryCatch - node_modules\regenerator-runtime\runtime.js:135:28 in invoke - node_modules\regenerator-runtime\runtime.js:145:19 in PromiseImpl.resolve.then$argument_0 - node_modules\promise\setimmediate\core.js:37:14 in tryCallOne - node_modules\promise\setimmediate\core.js:123:25 in setImmediate$argument_0 - node_modules\react-native\Libraries\Core\Timers\JSTimers.js:146:14 in _callTimer - node_modules\react-native\Libraries\Core\Timers\JSTimers.js:194:17 in _callImmediatesPass - node_modules\react-native\Libraries\Core\Timers\JSTimers.js:458:30 in callImmediates * [native code]:null in callImmediates - node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:407:6 in callImmediates - node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:143:6 in __guard$argument_0 - node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:384:10 in __guard - node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:142:17 in \guard$argument_0 * [native code]:null in flushedQueue * [native code]:null in invokeCallbackAndReturnFlushedQueue


This is what I get when I can run my app. MaterialTopTabNavigator doesn't work and crashes the app if you try to navigate with it.

I tried the example in this repo that has a MaterialTopTabNavigator and swiping crashes the app.

I cloned and tried to install the nav examples and with expo start you are greeted by this:

\error Invalid regular expression: >\/(.\fixtures\.|node_modules[\]react[\]dist[\].|website\node_modules\.|heapCapture>\\bundle.js|.\tests\.)$/: Unterminated character class.

Metro Bundler process exited with code 1

You can fix that with this and the navigation will work normally https://stackoverflow.com/questions/59567538/invalid-regular-expression-error-after-running-expo-start-command

Doesn't remove the fact that my own project is broken sadly.

Unable to resolve "react-native-screens" from "node_modules\react-navigation-stack\lib\module\views\StackView\StackViewCard.js" Failed building JavaScript bundle.

⬆ This wasn't necessary before when I started with vue-native-router few months ago. Maybe this is causing the issue?

Mgrmjp commented 4 years ago

The problem was that I had a focus listener from vue-native router that was improperly set.

this.focusListener = navigation.addListener("didFocus", () => { // The screen is focused // Call any action });

Should have been like that but I had removed the function for some odd reason.