gpt4 book ai didi

react-native - React Native - 无法解析模块 `@babel/runtime/helpers/interopRequireDefault`

转载 作者:行者123 更新时间:2023-12-05 03:01:00 28 4
gpt4 key购买 nike

我将我的 React Native 应用程序从 0.48.3 升级到 0.59.8 在启动模拟器之前一切正常。然后出现这个错误:

   error: bundling failed: Error: Unable to resolve module 
`@babel/runtime/helpers/interopRequireDefault` from
`E:\als\variant\generic\index.android.js`: Module
`@babel/runtime/helpers/interopRequireDefault` does not exist in the
Haste module map

这是我的 Package.json :

  "dependencies": {
"@babel/polyfill": "^7.4.4",
"@babel/runtime": "^7.0.0-beta.55",
"babel-loader": "^8.0.5",
"content-disposition": "^0.5.2",
"core-js": "^3.0.1",
"react": "16.8.6",
"react-dom": "16.8.6",
"react-loader": "^2.4.5",
"react-native": "0.59.8",
"react-redux": "^5.0.6",
"react-router-dom": "^5.0.0",
"redux": "^3.7.2",
"redux-thunk": "^2.2.0",

},
"devDependencies": {
"@babel/plugin-proposal-class-properties": "^7.4.4",
"@babel/plugin-proposal-decorators": "^7.4.4",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.4.4",
"@babel/plugin-transform-block-scoping": "^7.0.0",
"@babel/plugin-transform-flow-strip-types": "^7.4.4",
"@babel/plugin-transform-react-jsx-source": "^7.2.0",
"@babel/plugin-transform-runtime": "^7.4.4",
"@babel/preset-env": "^7.4.3",
"@babel/preset-flow": "^7.0.0",
"@babel/preset-react": "^7.0.0",
"babel-eslint": "^10.0.1",
"babel-jest": "^24.8.0",
"babel-preset-react-native": "^5.0.2",
}

我已经尝试了在类似问题中找到的所有解决方案,但都没有用。请问您有什么想法吗?

最佳答案

尝试重置缓存

npm run start --reset-cache

关于react-native - React Native - 无法解析模块 `@babel/runtime/helpers/interopRequireDefault`,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56397626/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com