Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/reactjs/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Reactjs React Native-JEST:haste.hasteImplModulePath选项中的React Native/JEST/hasteImpl.js未找到_Reactjs_React Native_Jestjs_Expo - Fatal编程技术网

Reactjs React Native-JEST:haste.hasteImplModulePath选项中的React Native/JEST/hasteImpl.js未找到

Reactjs React Native-JEST:haste.hasteImplModulePath选项中的React Native/JEST/hasteImpl.js未找到,reactjs,react-native,jestjs,expo,Reactjs,React Native,Jestjs,Expo,我正在基于expo.io的react本机应用程序上实现jest 在遵循实现说明之后,我已经能够成功地通过我的系统上的jest测试 问题在于bitbucket管道。我遇到以下问题,管道失败 npx jest --ci ● Validation Error: Module react-native/jest/hasteImpl.js in the haste.hasteImplModulePath option was not found. <rootDir> is: /o

我正在基于expo.io的react本机应用程序上实现jest 在遵循实现说明之后,我已经能够成功地通过我的系统上的jest测试

问题在于bitbucket管道。我遇到以下问题,管道失败

npx jest --ci
● Validation Error:
  Module react-native/jest/hasteImpl.js in the haste.hasteImplModulePath option was not found.
     <rootDir> is: /opt/atlassian/pipelines/agent/build
}

有人能告诉我如何解决这个问题吗


应用程序和测试运行良好。但是管道失败了

我遇到了这个问题,将
jest expo
^31.0.0“
降级到
~29.0.0
,然后它又开始工作了

"jest": {
    "preset": "jest-expo"
},
"devDependencies": {
    "babel-jest": "^23.6.0",
    "babel-preset-react-native": "^4.0.1",
    "expo-cli": "^2.4.3",
    "enzyme": "3.3.0",
    "enzyme-adapter-react-16": "1.1.1",
    "jest": "^23.6.0",
    "jest-expo": "^31.0.0",
    "jest-react-native": "^18.0.0",
    "react-test-renderer": "^16.6.3"