googlemaps / googlemaps/react-native-navigation-sdk

Error when including NavigationView component in Expo project using expo-router

Open
#74 10 comments 1 reaction 1 assignee Assigned to @caio1985 View on GitHub
priority: p2 type: feature request
Dominant language
TypeScript
Stars
227
Forks
38
Avg merge
5d 7h
Merged PRs (30d)
10

Description

I'm trying to use the NavigationView component in a fresh Expo/React Native project but getting the error below. I've implemented the same code that you have in the [example here](https://github.com/googlemaps/react-native-navigation-sdk/blob/main/SampleApp/src/app.tsx) in a fresh Expo project.

```
TypeError: Cannot read property 'Commands' of undefined, js engine: hermes
at ContextNavigator (http://192.168.1.154:8081/node_modules/expo-router/entry.bundle//&platform=ios&dev=true&hot=false&lazy=true&transform.engine=hermes&transform.bytecode=true&transform.routerRoot=src%2Fapp:155950:24)
at ExpoRoot (http://192.168.1.154:8081/node_modules/expo-router/entry.bundle//&platform=ios&dev=true&hot=false&lazy=true&transform.engine=hermes&transform.bytecode=true&transform.routerRoot=src%2Fapp:155906:28)
at App
at ErrorToastContainer (http://192.168.1.154:8081/node_modules/expo-router/entry.bundle//&platform=ios&dev=true&hot=false&lazy=true&transform.engine=hermes&transform.bytecode=true&transform.routerRoot=src%2Fapp:299144:24)
at ErrorOverlay
at withDevTools(ErrorOverlay) (http://192.168.1.154:8081/node_modules/expo-router/entry.bundle//&platform=ios&dev=true&hot=false&lazy=true&transform.engine=hermes&transform.bytecode=true&transform.routerRoot=src%2Fapp:298678:27)
at RCTView
at View (http://192.168.1.154:8081/node_modules/expo-router/entry.bundle//&platform=ios&dev=true&hot=false&lazy=true&transform.engine=hermes&transform.bytecode=true&transform.routerRoot=src%2Fapp:40346:43)
at RCTView
at View (http://192.168.1.154:8081/node_modules/expo-router/entry.bundle//&platform=ios&dev=true&hot=false&lazy=true&transform.engine=hermes&transform.bytecode=true&transform.routerRoot=src%2Fapp:40346:43)
at AppContainer (http://192.168.1.154:8081/node_modules/expo-router/entry.bundle//&platform=ios&dev=true&hot=false&lazy=true&transform.engine=hermes&transform.bytecode=true&transform.routerRoot=src%2Fapp:40157:36)
at main(RootComponent) (http://192.168.1.154:8081/node_modules/expo-router/entry.bundle//&platform=ios&dev=true&hot=false&lazy=true&transform.engine=hermes&transform.bytecode=true&transform.routerRoot=src%2Fapp:123933:28)
```

When the component is not included on my homepage, the error doesn't exist. Has anyone run into this weird error before?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.