Please provide the following:
- SDK Version: 48.0.18
- iOS
- Managed workflow
I’m unable to include ExpoStoreReview. I followed these docs.
npx expo install expo-store-review expo-linking
Then in my code:
import * as StoreReview from 'expo-store-review';
if (await StoreReview.isAvailableAsync()) {
// you can call StoreReview.requestReview()
StoreReview.requestReview();
}
Then I get this error:
ERROR Error: Cannot find native module 'ExpoStoreReview', js engine: hermes
ERROR Invariant Violation: "main" has not been registered. This can happen if:
* Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project.
* A module failed to load due to an error and `AppRegistry.registerComponent` wasn't called., js engine: hermes
I’ve checked my node module and the NPM package is in there. I’ve deleted everything, cleared yarn cache, and re-installed all NPM packages. What could I be missing?
package.json:
{
"name": "appname",
"version": "1.0.0",
"scripts": {
"start": "expo start --dev-client -c",
"android": "expo run:android",
"ios": "expo run:ios",
"web": "expo start --web",
"eject": "expo eject",
"test": "jest",
"test:watch": "jest --watchAll",
"preview": "eas build -p ios --profile preview",
"build": "eas build -p ios --profile development",
"deploy": "eas build -p ios --profile production",
"update": "eas update --branch production --message 'Updating the app'"
},
"jest": {
"preset": "jest-expo",
"automock": false,
"setupFiles": [
"./src/jest/setup.js"
],
"setupFilesAfterEnv": [
"@testing-library/jest-native/extend-expect"
],
"transformIgnorePatterns": [
"node_modules/(?!((jest-)?react-native|@react-native(-community)?)|expo(nent)?|@expo(nent)?/.*|@expo-google-fonts/.*|react-navigation|@react-navigation/.*|@unimodules/.*|unimodules|sentry-expo|native-base|react-native-svg)"
],
"moduleFileExtensions": [
"ts",
"tsx",
"js",
"jsx"
],
"collectCoverage": false,
"collectCoverageFrom": [
"**/*.{js,jsx}",
"**/*.{ts,tsx}",
"!**/*.tff",
"!*.chunk.*",
"!**/coverage/**",
"!**/node_modules/**",
"!**/babel.config.js",
"!**/metro.config.js",
"!**/jest.setup.js"
]
},
"dependencies": {
"@apollo/client": "^3.5.5",
"@bugsnag/expo": "^47.1.0",
"@bugsnag/plugin-expo-eas-sourcemaps": "^47.1.0",
"@bugsnag/source-maps": "^2.3.1",
"@expo/metro-config": "^0.7.1",
"@expo/react-native-action-sheet": "^4.0.1",
"@expo/vector-icons": "^13.0.0",
"@react-native-async-storage/async-storage": "1.17.11",
"@react-native-community/netinfo": "9.3.7",
"@react-native-masked-view/masked-view": "0.2.8",
"@react-native-picker/picker": "2.4.8",
"@react-navigation/bottom-tabs": "^6.0.5",
"@react-navigation/native": "^6.0.2",
"@react-navigation/native-stack": "^6.1.0",
"@react-navigation/stack": "^6.3.16",
"@segment/analytics-react-native": "^2.16.1",
"@segment/sovran-react-native": "^1.0.4",
"@splitsoftware/splitio": "^10.17.1",
"@types/lunr": "^2.3.5",
"@types/react-native-modal": "^4.1.1",
"apollo3-cache-persist": "^0.14.1",
"array-move": "^4.0.0",
"cross-fetch": "^3.1.4",
"expo": "~48.0.18",
"expo-application": "~5.1.1",
"expo-asset": "~8.9.1",
"expo-blur": "~12.2.2",
"expo-build-properties": "~0.6.0",
"expo-clipboard": "~4.1.2",
"expo-constants": "~14.2.1",
"expo-crypto": "~12.2.1",
"expo-dev-client": "~2.2.1",
"expo-device": "~5.2.1",
"expo-file-system": "~15.2.2",
"expo-font": "~11.1.1",
"expo-image": "~1.0.1",
"expo-linear-gradient": "~12.1.2",
"expo-linking": "~4.0.1",
"expo-localization": "~14.1.1",
"expo-notifications": "~0.18.1",
"expo-sharing": "~11.2.2",
"expo-splash-screen": "~0.18.2",
"expo-status-bar": "~1.4.4",
"expo-store-review": "~6.2.1",
"expo-updates": "~0.16.4",
"expo-web-browser": "~12.1.1",
"graphql": "^16.0.1",
"graphql-type-json": "^0.3.2",
"i18n-js": "^3.8.0",
"immutability-helper": "^3.1.1",
"jest-fetch-mock": "^3.0.3",
"lodash": "^4.17.21",
"lunr": "^2.3.9",
"react": "18.2.0",
"react-devtools-core": "^4.28.0",
"react-dom": "18.2.0",
"react-lunr": "^1.1.0",
"react-native": "0.71.8",
"react-native-anchor-point": "^1.0.6",
"react-native-gesture-handler": "~2.9.0",
"react-native-get-random-values": "~1.9.0",
"react-native-google-mobile-ads": "^10.0.1",
"react-native-modal": "^13.0.1",
"react-native-purchases": "^6.3.0",
"react-native-reanimated": "~2.14.4",
"react-native-safe-area-context": "4.5.0",
"react-native-screens": "~3.20.0",
"react-native-svg": "13.4.0",
"react-native-web": "~0.18.11",
"react-native-webview": "11.26.0",
"usehooks-ts": "^2.9.1"
},
"devDependencies": {
"@babel/core": "^7.20.0",
"@testing-library/jest-native": "^4.0.4",
"@testing-library/react-hooks": "^7.0.2",
"@testing-library/react-native": "^9.0.0",
"@types/array-move": "^2.0.0",
"@types/enzyme": "^3.10.11",
"@types/graphql-type-json": "^0.3.2",
"@types/humanize-plus": "^1.8.0",
"@types/i18n-js": "^3.8.2",
"@types/immutability-helper": "^2.6.3",
"@types/jest": "^27.4.0",
"@types/lodash": "^4.14.178",
"@types/react": "~18.0.27",
"@types/react-dom": "~18.0.10",
"@types/react-native": "~0.70.6",
"@types/react-test-renderer": "^17.0.1",
"@types/uuid": "^8.3.4",
"babel-plugin-module-resolver": "^4.1.0",
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.6",
"eslint-config-airbnb": "^19.0.4",
"jest": "^29.2.1",
"jest-expo": "^48.0.0",
"msw": "^0.36.8",
"react-test-renderer": "17",
"ts-jest": "^27.1.3",
"ts-node": "^10.4.0",
"typescript": "^4.9.4"
},
"resolutions": {
"react-devtools-core": "4.24.0"
},
"private": true
}