react-native-geolocation-service
react-native-geolocation-service copied to clipboard
Can not run example app
Environment
Run npx react-native info
in your terminal and copy the results here.
Platforms
Ios
Versions
Latest
Description
npm run ios or yarn run ios in demo dir result in: error: Error: Unable to resolve module AccessibilityInfo from /react-native-geolocation-service/example/node_modules/react-native-geolocation-service/node_modules/react-native/Libraries/react-native/react-native-implementation.js: AccessibilityInfo could not be found within the project or in these directories: node_modules/react-native-geolocation-service/node_modules/react-native/node_modules node_modules/react-native-geolocation-service/node_modules node_modules ../node_modules
Reproducible Demo
Provide a detailed list of steps that reproduce the issue.
- i did yarn install in root and in example
- i did pod install
Expected Results
App runs
Hi @da1z
I managed to fix this issue, Just add this to your metro.config.js
, I will open a PR for this
/**
* Metro configuration for React Native
* https://github.com/facebook/react-native
*
* @format
*/
const packagePath = '../';
module.exports = {
resolver: {
nodeModulesPaths: [packagePath],
},
watchFolders: [packagePath],
transformer: {
getTransformOptions: async () => ({
transform: {
experimentalImportSupport: false,
inlineRequires: true,
},
}),
},
};
Remove node_modules from both root & example folder. Then only run yarn install
inside example folder.