当使用本机cli将Hermes跟踪配置文件转换为chrome跟踪配置文件并使用命令将其拉到本地计算机时
npx react-native profile-hermes [destinationDir]我会犯这样的错误。我正在使用Windows 10并响应本机版本0.66
'grep‘不被识别为内部或外部命令、可操作的程序或批处理文件。错误:命令失败:亚行外壳运行-as com.madhusona ls缓存/ -tp \ grep、-v、-v、/$、grep、-E '.cpuprofile‘、-1
登录到adb shell后,grep正在运行。
D:\madhusona> adb shell
generic_x86:/ $ run-as com.madhusona
generic_x86:/data/user/0/com.madhusona $ ls cache/ -tp | grep -v /$ | grep -E '.cpuprofile' | head -1
sampling-profiler-trace767276177515590089.cpuprofile
generic_x86:/data/user/0/com.madhusona $发布于 2022-10-19 15:18:51
我可能已经找到一个相关的问题,部分(或完全,我不确定)解释你的问题。
我知道你找到了一个绕过它的方法,但它仍然可能对你或其他人有帮助;)
https://stackoverflow.com/a/40983617/8687881
编辑:
我用git bash算出来的。它与许多POSIX (UNIX/Linux/等等)捆绑在一起。实用工具,如grep。因为grep不是Windows函数,所以您将无法轻松地将grep (然后是“head”函数)替换为Windows。
https://stackoverflow.com/questions/70921960
复制相似问题