【问题标题】:Setup Cypress on WSL ubuntu for windows 10在 Windows 10 的 WSL ubuntu 上设置赛普拉斯
【发布时间】:2020-10-19 19:38:48
【问题描述】:

我正在尝试在 Windows 10 机器的 WSL ubuntu 上设置赛普拉斯。 WSL ubuntu 没有提供自己的显示。因此,在设置赛普拉斯之前,我们需要执行几个步骤。我按照此处博客中提到的所有步骤进行操作: https://nickymeuleman.netlify.app/blog/gui-on-wsl2-cypress 但我不断收到以下错误:

Cypress failed to start.

This is usually caused by a missing library or dependency.

The error below should indicate which dependency is missing.

https://on.cypress.io/required-dependencies

If you are using Docker, we provide containers with all required dependencies installed.

----------


(Cypress:1690): Gtk-WARNING **: 10:15:51.766: cannot open display: 183.87.117.18:0.0

----------

Platform: linux (Ubuntu Linux - 18.04)
Cypress Version: 4.6.0

我还为 Windows 10 安装了 XLaunch。 有人能早点解决这个问题吗?谁能帮我解决这个问题?

谢谢

【问题讨论】:

  • 谢谢你的链接,它就像一个魅力????
  • 你已经解决了吗?

标签: reactjs windows-10 windows-subsystem-for-linux xlaunch


【解决方案1】:

从这里得到想法:https://github.com/microsoft/WSL/issues/4106#:~:text=you%20may%20also%20need%20to%20launch%20vcxsrv%20with%20the%20-ac%20argument

如果您正在运行 XLaunch - 通过双击任务栏中的图标并单击退出来退出它;

然后打开你的开始菜单>右键XLaunch快捷方式>更多>打开文件位置;

在资源管理器窗口中右键单击 XLaunch 快捷方式 > 属性;

在目标字段中的右双引号后添加不带双引号的“-ac” - 即对我来说是"C:\Program Files\VcXsrv\xlaunch.exe" -ac;

点击确定

现在再次运行赛普拉斯。耶!为我跑:)

【讨论】:

    【解决方案2】:

    对我来说,这是由 WSL1 映像引起的(尽管安装了 WSL2)。您可以通过wsl --list --verbose查看。按照步骤here 转换为 WSL2。

    【讨论】:

      猜你喜欢
      • 2021-12-05
      • 2023-04-04
      • 1970-01-01
      • 1970-01-01
      • 2018-06-27
      • 1970-01-01
      • 1970-01-01
      • 2020-12-23
      • 1970-01-01
      相关资源
      最近更新 更多