【问题标题】:The cypress npm package is installed, but the Cypress binary is missing (newbie)已安装 cypress npm 包,但缺少 Cypress 二进制文件(新手)
【发布时间】:2022-10-06 10:24:52
【问题描述】:

我看到了很多这个问题的例子,但没有什么能帮助我。抱歉,如果这个问题变得无聊。

我刚开始使用 node.js、Cypress 和 GitLab Pipelines。

我拼凑了一个简单的网络应用程序,一些简单的测试。 它第一次运行良好,但在随后的提交中,它在 \'Cypress Tests\' 步骤失败:The cypress npm package is installed, but the Cypress binary is missing.

日志还有很多内容,但我不知道什么是相关的。

这是我的 yml 文件

cypress tests:
  stage: test
  image: cypress/browsers:node14.17.0-chrome91-ff89
  cache:
    key: package-lock.json
    paths:
      - node_modules
  before_script:
    - npm install
    - npm run dev &
    - ./node_modules/.bin/wait-on http://localhost:3000
  script:
    - npm run cypress
  only:
    - merge_requests
    - master

你能帮忙解决任何看起来可能是罪魁祸首的事情吗? 或者至少帮助我理解如何更好地阅读情况? 我尝试尽可能多地阅读文档,但我看不到正确的方法。

    标签: node.js gitlab continuous-integration cypress pipeline


    【解决方案1】:

    我也是初学者,但我正在尝试回答。首先,您可以将"cypress:open" : "cypress open" 添加到文件 package.json 中。更多详情可以观看video

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-11-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-08-06
      • 2021-11-11
      相关资源
      最近更新 更多