我正在开发一个 React Native 应用程序。我的代码没有错误,但它面临构建问题。当我执行命令 react-native run-android 时,Metro Bundler 中出现错误。错误说:
UnhandledPromiseRejectionWarning: Failed to start watch mode.
我还尝试使用命令$yarn
add watchman 将 Watchman 添加到 node_modules。我得到一个提示,它已被弃用。
我应该如何解决错误?
我的 package.json 包含以下内容:
"dependencies": {
"expo": "^25.0.0",
"native-base": "^2.3.7",
"react": "16.2.0",
"react-native": "0.52.0",
"react-native-vector-icons": "^4.5.0",
"react-navigation": "^1.0.0-beta.27",
"watchman": "^1.0.0"
}
"devDependencies": {
"babel-jest": "22.1.0",
"babel-preset-react-native": "4.0.0",
"jest": "22.1.3",
"react-test-renderer": "16.2.0"
}