gpt4 book ai didi

android - react native 错误 : Unable to resolve module `AccessibilityInfo`

转载 作者:太空狗 更新时间:2023-10-29 15:40:04 26 4
gpt4 key购买 nike

我是 React-native 的新手,当我尝试构建我的第一个应用程序时,我遵循了所有说明,但我遇到了这个错误。我已经清除 catch restart npm 但仍然出现此错误。

The development server returned response error code: 500

URL: http://10.0.2.2:8081/index.delta?platform=android&dev=true&minify=false

Body:
{"originModulePath":"F:\\React Native\\AttendenceSystem\\node_modules\\react-native\\Libraries\\react-native\\react-native-implementation.js","targetModuleName":"AccessibilityInfo","message":"Unable to resolve module `AccessibilityInfo` from `F:\\React Native\\AttendenceSystem\\node_modules\\react-native\\Libraries\\react-native\\react-native-implementation.js`: Module `AccessibilityInfo` does not exist in the Haste module map\n\nThis might be related to https://github.com/facebook/react-native/issues/4968\nTo resolve try the following:\n 1. Clear watchman watches: `watchman watch-del-all`.\n 2. Delete the `node_modules` folder: `rm -rf node_modules && npm install`.\n 3. Reset Metro Bundler cache: `rm -rf /tmp/metro-bundler-cache-*` or `npm start -- --reset-cache`. 4. Remove haste cache: `rm -rf /tmp/haste-map-react-native-packager-*`.","errors":[{"description":"Unable to resolve module `AccessibilityInfo` from `F:\\React Native\\AttendenceSystem\\node_modules\\react-native\\Libraries\\react-native\\react-native-implementation.js`: Module `AccessibilityInfo` does not exist in the Haste module map\n\nThis might be related to https://github.com/facebook/react-native/issues/4968\nTo resolve try the following:\n 1. Clear watchman watches: `watchman watch-del-all`.\n 2. Delete the `node_modules` folder: `rm -rf node_modules && npm install`.\n 3. Reset Metro Bundler cache: `rm -rf /tmp/metro-bundler-cache-*` or `npm start -- --reset-cache`. 4. Remove haste cache: `rm -rf /tmp/haste-map-react-native-packager-*`."}],"name":"Error","stack":"Error: Unable to resolve module `AccessibilityInfo` from `F:\\React Native\\AttendenceSystem\\node_modules\\react-native\\Libraries\\react-native\\react-native-implementation.js`: Module `AccessibilityInfo` does not exist in the Haste module map\n\nThis might be related to https://github.com/facebook/react-native/issues/4968\nTo resolve try the following:\n 1. Clear watchman watches: `watchman watch-del-all`.\n 2. Delete the `node_modules` folder: `rm -rf node_modules && npm install`.\n 3. Reset Metro Bundler cache: `rm -rf /tmp/metro-bundler-cache-*` or `npm start -- --reset-cache`. 4. Remove haste cache: `rm -rf /tmp/haste-map-react-native-packager-*`.\n at ModuleResolver.resolveDependency (F:\\React Native\\AttendenceSystem\\node_modules\\metro\\src\\node-haste\\DependencyGraph\\ModuleResolution.js:167:1306)\n at ResolutionRequest.resolveDependency (F:\\React Native\\AttendenceSystem\\node_modules\\metro\\src\\node-haste\\DependencyGraph\\ResolutionRequest.js:80:16)\n at DependencyGraph.resolveDependency (F:\\React Native\\AttendenceSystem\\node_modules\\metro\\src\\node-haste\\DependencyGraph.js:237:485)\n at Object.resolve (F:\\React Native\\AttendenceSystem\\node_modules\\metro\\src\\lib\\transformHelpers.js:116:25)\n at dependencies.map.result (F:\\React Native\\AttendenceSystem\\node_modules\\metro\\src\\DeltaBundler\\traverseDependencies.js:298:29)\n at Array.map (<anonymous>)\n at resolveDependencies (F:\\React Native\\AttendenceSystem\\node_modules\\metro\\src\\DeltaBundler\\traverseDependencies.js:294:16)\n at F:\\React Native\\AttendenceSystem\\node_modules\\metro\\src\\DeltaBundler\\traverseDependencies.js:159:33\n at Generator.next (<anonymous>)\n at step (F:\\React Native\\AttendenceSystem\\node_modules\\metro\\src\\DeltaBundler\\traverseDependencies.js:239:307)"}
processBundleResult
BundleDownloader.java:285
access$200
BundleDownloader.java:37
onResponse
BundleDownloader.java:163
execute
RealCall.java:153
run
NamedRunnable.java:32
runWorker
ThreadPoolExecutor.java:1113
run
ThreadPoolExecutor.java:588
run
Thread.java:818

最佳答案

该错误是因为您的 React Native 项目版本。

你现在必须通过这个版本来创建你的项目--->

react-native init ProjectName --version 0.55.4

只需等待下一个版本的 React Native 让他们解决这个问题。

关于android - react native 错误 : Unable to resolve module `AccessibilityInfo` ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51498218/

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