expo: Warning: 'react-native' dependency is not installed

I’ve been seeing this issue in both exp cli and the AppImage file distribuited for Linux, I’m running both in their latest stable version at the moment of writing this.

Whenever I create a project with either I see a this text :

Warning: 'react-native' dependency is not installed.
If there is an issue running your project, please run `npm install` in [project_folder] and restart.

where [project_folder] it’s the current project path.

Fun fact is react-native npm package is installed globally, so if I type react-native --version I get an output from the current installed version

[jc@jc-pc test_project]$ react-native --version
react-native-cli: 2.0.1
react-native: https://github.com/expo/react-native/archive/sdk-22.0.1.tar.gz

The problem itself is not major because it solves itself once you run npm install inside of the folder, but beats one of the purposes of this tool, which should be a simple, one step setup of the project.

Am I missing something for both the AppImage and the exp command to recognize the react-native dependency?

Thanks

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 7
  • Comments: 26 (5 by maintainers)

Most upvoted comments

Removing package-lock.json, yarn.lockand node_modules and then running yarn should do the trick.

Just faced the same issue over here, solved following @Donskelle trick (using npm, not yarn).

rm -rf node_modules npm install

Currently using node 10.7.0 and npm 6.2.0

Exact same issue here. There wasn’t any issue 10 days ago.

This is an issue for me with yarn. I tried @Donskelle 's solution, but it did not work for me (maybe because I am not using npm). Looking for a solution with yarn!

@llanginger please do this…

  1. Remove node_modules folder rm -rf node_modules.
  2. Delete package-lock.json file.
  3. start expo.
  4. And after do yarn install.
  5. close and restart expo again…

So for some people it’s working with NPM, not Yarn. And for some it’s vice versa. 😃 I’m using Yarn and removing node_modules and the lock file doesn’t help.

This has been nagging me for a while, but I don’t pay much attention to it. It doesn’t affect anything.

deleting package-lock.json and node_modules folder and then npm install STILL facing issue.