question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to resolve module react-native

See original GitHub issue

We use GitHub Issues for bugs.

Description

I recently created a new project using react-native init MyProject. The app ran fine initially.

However now, when I run react-native run-ios or try to use xcode to run the app. I get the following error screen.

screen shot 2016-12-01 at 6 44 02 pm

I have followed the suggested instructions and have ran the following

rm -rf node_modules
rm -rf $TMPDIR/react-* --reset-cache
rm -rf node_modules/react-native/packager/packager.sh --reset-cache
npm cache clean
npm i

But I still experience the same problem

I have verified that react-native is in fact installed at the correct location.

  • React Native version: 0.38.0
  • Platform: iOS
  • Operating System: MacOS

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:10
  • Comments:26 (1 by maintainers)

github_iconTop GitHub Comments

6reactions
wagstaffwmcommented, Apr 11, 2017

+1 - i’ve gutted 2 projects now because of this, yikes

3reactions
ifalldevcommented, May 30, 2017

I resolved this using the react-native-git-upgrade package instead of react-native upgrade to upgrade the project. And because of this I had to use yarn instead of npm.

So, i did something like that:

npm i -g react-native-git-upgrade

git clone https://github.com/ifalldev/repo
cd repo

yarn
yarn add react@16.0.0-alpha.6
yarn add react-native@0.43.3
react-native-git-upgrade

rnpm link

react-native run-ios
Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to Resolve Module in React Native App - Stack Overflow
Unable to solve module 'module-name' is realated to the node modules packages and sometime you would need to ...
Read more >
0.62.1. error: Error: Unable to resolve module `react-native ...
Upgraded project to 0.62.1. Deleted node_modules, watchman, metro cache etc. Build completes but application fails to start with the error: error: Error: ...
Read more >
React Native, Typescript and VS Code: Unable to resolve ...
React Native, Typescript and VS Code: Unable to resolve module · Reset the tool that watches files for changes on disk: · Rebuild...
Read more >
Module not found | Can not resolve module in react - YouTube
Your browser can't play this video. ... Module not found | Can not resolve module in react ... 21K views 1 year ago...
Read more >
undefined Unable to resolve module react-native-google-signin
ERROR [Error: undefined Unable to resolve module react-native -google-signinPlease do like share and comment if you like the video please do ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found