gpt4 book ai didi

android - 错误 : Watchman was not found in PATH in windows

转载 作者:太空狗 更新时间:2023-10-29 13:09:45 30 4
gpt4 key购买 nike

我正在学习 react-native 编程来开发 android 应用程序。在运行时运行应用程序时出现一些错误 unable to resolve module。我为此找到了一些链接,并建议运行此命令 react-native start --reset-cache ,这又需要系统上的 watchman 。我安装了 watchman 然后在我无法启动 react-native

react-native start

D:\React Native\Example 1\ExampleOne>react-native start
Scanning 560 folders for symlinks in D:\React Native\Example 1\ExampleOne\node_m
odules (27ms)
┌────────────────────────────────────────────────────────────────────────────┐

│ Running packager on port 8081. │

│ │

│ Keep this packager running while developing on any JS projects. Feel │

│ free to close this tab and run your own packager instance if you │

│ prefer. │

│ │

│ https://github.com/facebook/react-native │

│ │

└────────────────────────────────────────────────────────────────────────────┘

Looking for JS files in
D:\React Native\Example 1\ExampleOne

Loading dependency graph...Watchman: Watchman was not found in PATH. See https
://facebook.github.io/watchman/docs/install.html for installation instructions

React packager ready.

jest-haste-map: Watchman crawl failed. Retrying once with node crawler.
Usually this happens when watchman isn't running. Create an empty `.watchmanco
nfig` file in your project's root folder or initialize a git or hg repository in
your project.
Error: Watchman was not found in PATH. See https://facebook.github.io/watchma
n/docs/install.html for installation instructions
Watchman: Watchman was not found in PATH. See https://facebook.github.io/watch
man/docs/install.html for installation instructions
ERROR Watchman was not found in PATH. See https://facebook.github.io/watchman
/docs/install.html for installation instructions
{"code":"ENOENT","errno":"ENOENT","syscall":"spawn watchman","path":"watchman","
spawnargs":["--no-pretty","get-sockname"]}
Error: Watchman was not found in PATH. See https://facebook.github.io/watchman/
docs/install.html for installation instructions
at exports._errnoException (util.js:1022:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
at onErrorNT (internal/child_process.js:359:16)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)

See http://facebook.github.io/react-native/docs/troubleshooting.html
for common problems and solutions.

D:\React Native\Example 1\ExampleOne>

我已经成功安装了 watchman & 当我尝试执行 watchman 命令时它正在发生

enter image description here

enter image description here

这是安装我的watchman 的地方。我也在我的 Windows 机器的 PATH 中添加了这个。 D:\React Native\Example 1\ExampleOne\node_modules\watchman

PATH 是 D:\React Native\Example 1\ExampleOne\node_modules\watchman

我不确定是什么原因导致了这个问题。我的路径是错误的还是我指向错误的 watchman 目录?谁能建议我如何解决这个问题。提前致谢

最佳答案

您可以通过卸载 watchman npm 包简单地解决这个问题。尝试全局和本地卸载它 npm uninstall -g watchman npm uninstall watchman

关于android - 错误 : Watchman was not found in PATH in windows,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42577515/

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