首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >错误:不可用(此监视器只能在Darwin上使用)

错误:不可用(此监视器只能在Darwin上使用)
EN

Stack Overflow用户
提问于 2018-09-20 22:45:28
回答 8查看 18K关注 0票数 32

我在本地环境中克隆了一个现有的react原生应用程序,但每次运行react-native run-ios时都会收到以下错误:

代码语言:javascript
运行
复制
** BUILD FAILED **


The following commands produced analyzer issues:
    Analyze /Users/alydabbous/code/Dabbous-Innopay/ideal-app/node_modules/react-native/ReactCommon/yoga/yoga/YGNodeList.c normal x86_64

    Analyze /Users/alydabbous/code/Dabbous-Innopay/ideal-app/node_modules/react-native/ReactCommon/yoga/yoga/Yoga.c normal x86_64
    Analyze Base/RCTModuleMethod.mm normal x86_64
(3 commands with analyzer issues)

The following build commands failed:
    Ld build/Build/Products/Debug-iphonesimulator/MyUros.app/MyUros normal x86_64
(1 failure)

Installing build/Build/Products/Debug-iphonesimulator/TPP.app
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2):
Failed to install the requested application
An application bundle was not found at the provided path.
Provide a valid path to the desired application bundle.
Print: Entry, ":CFBundleIdentifier", Does Not Exist

Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/TPP.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist

react-packager中的这个错误:

代码语言:javascript
运行
复制
Loading dependency graph...(node:52097) UnhandledPromiseRejectionWarning: Error: `fsevents` unavailable (this watcher can only be used on Darwin)
    at new FSEventsWatcher (/Users/alydabbous/code/Dabbous-Innopay/ideal-app/node_modules/sane/src/fsevents_watcher.js:41:11)
    at createWatcher (/Users/alydabbous/code/Dabbous-Innopay/ideal-app/node_modules/jest-haste-map/build/index.js:600:23)
    at Array.map (<anonymous>)
    at HasteMap._watch (/Users/alydabbous/code/Dabbous-Innopay/ideal-app/node_modules/jest-haste-map/build/index.js:747:25)
    at _buildPromise._buildFileMap.then.then.hasteMap (/Users/alydabbous/code/Dabbous-Innopay/ideal-app/node_modules/jest-haste-map/build/index.js:279:21)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:189:7)
(node:52097) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:52097) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

只有当我为我克隆的存储库运行react-native run-ios时,我才会得到这个错误。但是,当我创建一个新的原生react应用程序时,一切都很正常。我尝试了所有的方法:杀死服务器,卸载并重新安装节点,删除我的node_modules文件,等等,但我仍然不能解决这个问题。任何帮助都将不胜感激。谢谢。

EN

回答 8

Stack Overflow用户

发布于 2018-11-28 21:33:33

对于我来说,我卸载了watchman,然后使用brew重新安装了它,如下所示:

代码语言:javascript
运行
复制
npm r -g watchman 
brew install watchman
票数 43
EN

Stack Overflow用户

发布于 2019-01-23 09:01:39

代码语言:javascript
运行
复制
npm install -g fsevents

对我很管用

票数 21
EN

Stack Overflow用户

发布于 2020-04-13 04:19:35

在编写react原生应用程序时,我遇到了以下问题。它似乎是watchman的一个错误,所以我们需要做的就是重新安装它:

brew remove watchman

brew install watchman

我希望这能帮上忙

票数 6
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/52427810

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档