2

As title suggest I have a problem with jest in react-native.

TypeError: babelHelpers.typeof is not a function

I know that this is not a new error. I saw that:

New react-native app has 'TypeError: babelHelpers.typeof is not a function' [iOS]

and

https://github.com/facebook/react-native/issues/4844#issuecomment-204035720

and I've done almost everything that was said.

package.json
{
  "name": "Something",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "start": "node node_modules/react-native/local-cli/cli.js start",
    "test": "jest"
  },
  "jest": {
    "scriptPreprocessor": "node_modules/react-native/jestSupport/preprocessor.js",
    "setupEnvScriptFile": "node_modules/react-native/jestSupport/env.js",
    "testPathIgnorePatterns": [
      "/node_modules/",
      "packager/react-packager/src/Activity/"
    ],
    "testFileExtensions": [
      "js"
    ],
    "unmockedModulePathPatterns": [
      "promise",
      "source-map"
    ]
  },
  "dependencies": {
    "babel-root-import": "^4.0.1",
    "react": "15.2.1",
    "react-native": "^0.30.0-rc.0",
    "react-native-aws-signature": "0.0.9",
    "react-native-fbsdk": "^0.2.2",
    "react-native-localization": "^0.1.15",
    "react-redux": "^4.4.5",
    "redux": "^3.5.2",
    "redux-storage": "^4.0.1",
    "redux-storage-engine-reactnativeasyncstorage": "^1.0.1"
  },
  "devDependencies": {
    "babel": "^6.5.2",
    "babel-jest": "^13.2.2",
    "babel-preset-react-native": "^1.9.0",
    "babel-preset-react-native-stage-0": "^1.0.1",
    "jest-cli": "^13.2.3",
    "redux-logger": "^2.6.1"
  }
}

.babelrc
{
  "presets": ["react-native-stage-0"]
}

Did I miss something? I am running everything on Windows 10.

Community
  • 1
  • 1
Luzgan
  • 106
  • 10

0 Answers0