RN 0.59.8 - Unable to resolve module `pegjs`
See original GitHub issueI’m running the latest version of RN (0.59.8) with the latest version of react-native-svg (9.4.0). When I try to launch the application, both in iOS and Android, I receive the following error:
bundling failed: Error: Unable to resolve module
pegjs
from/Users/PATH_TO_APP/android/react-native-svg/lib/extract/extractTransform.js
: Modulepegjs
does not exist in the Haste module map
Do you know how I can fix this?
Thanks, Lorenzo
Issue Analytics
- State:
- Created 4 years ago
- Comments:11
Top Results From Across the Web
RN 0.59.8 - Unable to resolve module pegjs #1007 - GitHub
The latest version has no dependencies at all. This error means you're loading old js in your app. Try clearing caches, reinstall the...
Read more >Unable to Resolve Module in React Native App - Stack Overflow
Bar ) will be unavailable in your app, and thus RN says unhelpful things like module not found and Indeed, none of these...
Read more >react native unable to resolve module - You.com | The Search ...
I was reading the error message as "can't resolve a path to the module". So the root cause is, the file it lists...
Read more >Error: Unable to resolve module `util` – Split Help Center
Running bundle using React Native and Javascript SDK causes an error. Bundling failed: Error: Unable to resolve module `util`.
Read more >React Native in the browser - Expo Snack
Did you know: You can turn off automatic updates under Devices in the footer? Unable to resolve module '@react-native-community/slider.js ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@kelset @msand I’ve figured out what the problem was.
My Brownfield React Native project was including
react-native-svg
as a local dependency. In other words, I’ve downloaded the source code ofreact-native-svg
and included it as a module served locally and not as a node module (this was due to fix some problems on the gradle file).During the migration, Android Studio was building against that module and not the new one available in
node_modules
. That was causing the error.I’ve fixed following this guide: https://stackoverflow.com/questions/23025433/how-to-clear-gradle-cache. In particular, I removed the gradle build cache.
Thanks for your support.
yeah caches can create so many issues 😦 I’m glad you solved!