I’m trying to run a react native app using Expo Go, but it shows the following error:
None of these files exist:
* node_modulesreact-nativeLibrariesComponentsDatePickerDatePickerIOS(.native|.native.js|.js|.native.jsx|.jsx|.native.json|.json|.native.ts|.ts|.native.tsx|.tsx|.native.svg|.svg)
* node_modulesreact-nativeLibrariesComponentsDatePickerDatePickerIOSindex(.native|.native.js|.js|.native.jsx|.jsx|.native.json|.json|.native.ts|.ts|.native.tsx|.tsx|.native.svg|.svg)
15 | import typeof ActivityIndicator from './Libraries/Components/ActivityIndicator/ActivityIndicator';
16 | import typeof Button from './Libraries/Components/Button';
> 17 | import typeof DatePickerIOS from './Libraries/Components/DatePicker/DatePickerIOS';
The problem is that I don’t even use this component. How can I remove the module?
2
Answers
You can remove a package by going to the package.json folder in your project. Your package should be listed under "dependencies". Remove it and run your project again. Hopefully that fixed it 🤞🏽
May want to rebuild your node_modules folder by running "npm install".
This is a known issue that is now fixed for the 0.72.0, 0.71.11, 0.70.12, 0.69.12 version patches.
If you have an older than 0.69 version, and you can’t upgrade, you can use the following Metro configuration to fix the issue:
or for non-Expo config: