skip to Main Content

package.json

"scripts": {
   "test": "jest --coverage=false",
   "testCoverage": "jest"
},
  "dependencies": {
    "@config-plugins/react-native-blob-util": "^6.0.0",
    "@config-plugins/react-native-pdf": "^6.0.0",
    "@react-native-async-storage/async-storage": "1.18.2",
    "@react-native-community/datetimepicker": "7.2.0",
    "@react-native-menu/menu": "^0.9.1",
    "@react-native-picker/picker": "2.4.10",
    "@react-navigation/elements": "^1.3.21",
    "@shopify/flash-list": "1.4.3",
    "@tamagui/toast": "^1.75.2",
    "@tanstack/query-core": "^4.36.1",
    "@tanstack/react-query": "^4.36.1",
    "axios": "^1.5.1",
    "babel-plugin-transform-inline-environment-variables": "^0.4.4",
    "date-fns": "^2.30.0",
    "dayjs": "^1.11.10",
    "expo": "^49.0.16",
    "expo-router": "2.0.9",
    "react": "18.2.0",
    "react-dom": "18.2.0",
    "react-native": "0.72.6",
    "react-native-blob-util": "^0.19.2",
    "react-native-console-time-polyfill": "^1.2.3",
    "react-native-gesture-handler": "~2.12.1",
    "react-native-reanimated": "~3.3.0",
    "react-native-safe-area-context": "4.7.3",
    "react-native-svg": "13.9.0",
    "tamagui": "^1.75.2",
    "uuid": "^3.4.0",
    "zeego": "^1.7.2",
    "zod": "^3.22.4",
    "zod-validation-error": "^2.0.0",
    "zustand": "^4.4.4"
  },
"devDependencies": {
   "@babel/core": "^7.23.2",
   "@babel/plugin-proposal-export-namespace-from": "^7.18.9",
   "@datadog/datadog-ci": "^2.22.1",
   "@types/react": "^18.2.31",
   "react-native-svg-transformer": "^1.1.0",
   "rn-flipper-async-storage-advanced": "^1.0.5",
   "@types/jest": "29.5.11",
   "@types/react-test-renderer": "18.0.7",
   "@testing-library/react-native": "^12.4.3",
   "babel-preset-expo":"^10.0.1",
   "jest": "^29.7.0",
   "jest-expo": "^50.0.1",
   "react-test-renderer": "^18.2.0"
},
"jest": {
   "preset": "jest-expo",
   "transformIgnorePatterns": [
   "node_modules/(?!(jest-)?react-native|@react-native(-community)?|expo(nent)?|@expo(nent)?/.*|@expo-google-fonts/.*|react-navigation|@react-navigation/.*|@unimodules/.*|unimodules|sentry-expo|native-base|react-native-svg|expo/build/winter)"
   ],
   "collectCoverage": true,
   "collectCoverageFrom": [
     "**/*.{ts,tsx}",
     "!**/coverage/**",
     "!**/node_modules/**",
     "!**/babel.config.js"
   ]
  }

babel.config.js

module.exports = function(api) {
  api.cache(true);
  return {
    presets: ['babel-preset-expo'],
    plugins: ['expo-router/babel','@babel/plugin-proposal-export-namespace-from','react-native-reanimated/plugin']

Test suite failed to run

Cannot find module ‘expo/build/winter’ from ‘node_modules/jest-expo/src/preset/setup.js’

at Resolver._throwModNotFoundError (node_modules/jest-resolve/build/resolver.js:427:11)
at Object.<anonymous> (node_modules/jest-expo/src/preset/setup.js:243:1)

Test Suites: 1 failed, 1 total
Tests:       0 total
Snapshots:   0 total
Time:        0.378 s


Removed node_modules and reinstalled. Clean cache. Not sure if there is any difference between 
adding 
    "jest": "^29.7.0",
    "jest-expo": "^50.0.1",
    "react-test-renderer": "^18.2.0"

under **devDependencies** or **dependencies**

2

Answers


  1. Have the same issue – triggered by upgrading expo – itself something I did because of issues with react native reanimated and skia.

    Hope someone can come up with a fix.

    Login or Signup to reply.
  2. Is your expo app in a monorepo?

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search