create-react-native-app icon indicating copy to clipboard operation
create-react-native-app copied to clipboard

New app not running in simulator

Open gjhughes opened this issue 8 years ago • 16 comments

Description

Created a new app but cannot get it to run via iOS simulator.

Expected Behavior

What action did you perform, and what did you expect to happen?

yarn ios expected simulator to run app but get an error message.

Observed Behavior

What actually happened when you performed the above actions?

get these warnings on creating the app: warning "expo > [email protected]" has incorrect peer dependency "react-native@^0.51 || ^0.52 || ^0.53 || ^0.54". warning "react-native > [email protected]" has unmet peer dependency "eslint@^3.17.0 || ^4.0.0". warning "jest-expo > [email protected]" has unmet peer dependency "babel-core@^6.0.0 || ^7.0.0-0".

Console reads this after 'yarn ios': 17:14:52: Warning: 'react' peer dependency missing. Run npm ls in /Users/Gavin/Desktop/myapp to see full warning. 17:14:52: 17:14:52: If there is an issue running your project, please run npm install in /Users/Gavin/Desktop/myapp and restart.

Console reads this after 'npm ls': npm ERR! peer dep missing: [email protected], required by [email protected] npm ERR! extraneous: [email protected] /Users/Gavin/Desktop/test_app/node_modules/node-pre-gyp npm ERR! extraneous: [email protected] /Users/Gavin/Desktop/test_app/node_modules/websql npm ERR! missing: websql@https://github.com/expo/node-websql/archive/18.0.0.tar.gz, required by [email protected] npm ERR! peer dep missing: react-native@^0.51 || ^0.52 || ^0.53 || ^0.54, required by [email protected] npm ERR! peer dep missing: eslint@^3.17.0 || ^4.0.0, required by [email protected]

Environment

Please run these commands in the project folder and fill in their results:

[email protected] [email protected] [email protected] v8.4.0 4.6.1 1.5.1 "version": "4.9.0"

Also specify:

  1. Operating system: macOS High Sierra 10.13.4
  2. Phone/emulator/simulator & version: Simulator Version 10.0

gjhughes avatar Apr 28 '18 16:04 gjhughes

I have a similar problem on android. Later i'll provide more info. Also, i tried npm install, and the warning is out but still cannot load on emulator.

nicoceledon avatar May 01 '18 14:05 nicoceledon

I tried again from zero, but i removed expo from simulator. Got the same warning but now it runs on the simulator.

nicoceledon avatar May 01 '18 16:05 nicoceledon

@nicoceledon thanks, just done the same. Still getting warnings but the app is now building and running. Thanks very much!

gjhughes avatar May 01 '18 16:05 gjhughes

Same problem. How do I start again at zero (rm -rf folder, re-init folder?)

thomashrabe avatar May 10 '18 03:05 thomashrabe

I had the same problem. here's what seems to work:

Uninstall yarn (this may not be necessary) roll back npm to version 4.6.1 install [email protected] install [email protected] add the installs to json file to silence extraneous warning now the only error you should be left with is:

npm ERR! peer dep missing: react-native@^0.51 || ^0.52 || ^0.53 || ^0.54, required by [email protected] which is a problem with the react-native-maps package used for working with maps not the js function map

ghost avatar May 15 '18 17:05 ghost

@rss81 So did your steps solve the react-native@^0.51 || ^0.52 || ^0.53 || ^0.54, required by [email protected] issue. It's not 100% clear to me

thomashrabe avatar May 15 '18 18:05 thomashrabe

no, the problem is if you install 0.54 then you have a lot of problems as the build with expo require 0.55

ghost avatar May 15 '18 18:05 ghost

yes. I think the problem is in the react-native-maps package that needs to be updated...?

thomashrabe avatar May 15 '18 18:05 thomashrabe

i registered an open issue on the package, now we just need to wait

ghost avatar May 15 '18 18:05 ghost

I'm experiencing the same problem as described in first post - If I use yarn to install dependencies.However If I use npm to install dependencies and start server, I only get error related to the react-native-maps.

npm ERR! peer dep missing: react-native@^0.51 || ^0.52 || ^0.53 || ^0.54, required by [email protected]

https://github.com/react-community/react-native-maps/issues/2259

bedakb avatar May 16 '18 06:05 bedakb

if you're using Expo, Update to a new version. same applies to the simulator, Delete the Expo client app from the simulator, and redownload from the command line yarn run ios. You can follow this link if you are having troubles in installation : https://docs.expo.io/versions/latest/introduction/installation

Osama92 avatar May 20 '18 12:05 Osama92

You can also use Expo XDE, it will automatically update the Expo client for the simulator.

tonjack avatar May 22 '18 01:05 tonjack

@tonjack Unfortunately did not work for me on an entirely blank system:

thomas@rethina ;) npm install react-native-maps --save

/Users/thrabe/test1
├─┬ [email protected]
│ ├── UNMET PEER DEPENDENCY react-native@^0.51 || ^0.52 || ^0.53 || ^0.54
│ └── [email protected]
├─┬ UNMET PEER DEPENDENCY [email protected] invalid
│ └── UNMET PEER DEPENDENCY eslint@^3.17.0 || ^4.0.0
└─┬ [email protected]
  └─┬ [email protected]
    └── [email protected]

thomashrabe avatar May 22 '18 05:05 thomashrabe

I had Warning: 'react' peer dependency missing. Run npm ls warning. This was my package.json file.

"dependencies": {
    "expo": "28.0.0",
    "react": "16.4.1",
    "react-native": "https://github.com/expo/react-native/archive/sdk-28.0.0.tar.gz",
    "react-navigation": "2.6.2",
    "tslib": "1.9.3"
  },
  "devDependencies": {
    "@types/expo": "27.0.6",
    "@types/expo__vector-icons": "6.2.2",
    "@types/fbemitter": "2.0.32",
    "@types/react": "16.4.1",
    "@types/react-native": "0.56.1",
    "@types/react-navigation": "2.0.11",
    "exp": "55.0.5",
    "react-native-typescript-transformer": "1.2.10",
    "tslint": "5.10.0",
    "tslint-eslint-rules": "5.3.1",
    "tslint-react": "3.6.0",
    "typescript": "2.9.2"
  }

It is fixed when react and @types/react are downgraded.

yarn add [email protected] yarn add @types/[email protected]

borabuilds avatar Jul 16 '18 20:07 borabuilds

In my case downgrading packages helped. Just hit npm install and check carefully what peer version your package needs and what version you project uses. In my case I had to download older verion of react.

pabichw avatar Jul 19 '18 17:07 pabichw

Deleting the node_modules and running yarn install instead of npm install solved the problem for me.

JoasE avatar Sep 02 '18 19:09 JoasE