Patrick Connors
Patrick Connors

Reputation: 6085

React-native install issue in expo app

I'm trying to learn react-native by creating an app using the expo development environment. I had a working app (little more than the code that shipped with expo) until installing redux. Currently I am getting the following error from the XDE:

Problem checking node_modules dependencies: Unexpected end of JSON input

and the following from the ios simulator:

undefined is not an object (evaluating 'ReactPropTypes.string')

Package.json:

{
  "name": "myApp",
  "version": "0.0.0",
  "description": "Hello Expo!",
  "author": null,
  "main": "main.js",
  "scripts": {
    "test": "node node_modules/jest/bin/jest.js"
  },
  "jest": {
    "preset": "jest-expo"
  },
  "dependencies": {
    "@expo/ex-navigation": "~3.0.0",
    "@expo/samples": "~1.0.3",
    "babel-preset-react": "^6.24.1",
    "expo": "17.0.0",
    "react": "^16.0.0-alpha.12",
    "react-native": "^0.45.1",
    "react-redux": "^5.0.5",
    "redux": "^3.6.0"
  },
  "devDependencies": {
    "jest-expo": "~1.0.1"
  }
}

I believe my node modules contain valid JSON. It should be noted that I'm using a more current version of react-native than expo. Is this an issue with the packages I have installed? Which files would be helpful in solving this?

Upvotes: 0

Views: 1303

Answers (2)

dikaiosune
dikaiosune

Reputation: 1105

I believe this is due to a bug in the current release of npm 5. As mentioned in the other answer here, using npm 4 or yarn will resolve this problem.

Upvotes: 0

Patrick Connors
Patrick Connors

Reputation: 6085

Although I haven't been able to fix this particular error. This one and many others can be avoided by using yarn instead of npm when working with expo (I have no affiliation with either tool).

Upvotes: 3

Related Questions