【问题标题】:Cypress module instalation failed赛普拉斯模块安装失败
【发布时间】:2020-05-25 03:50:28
【问题描述】:

我尝试安装 cypress 模块

npm install cypress --save-dev

cypress.io 在 Cloudflare 上运行,它会阻止请求:

URL: https://download.cypress.io/desktop/3.4.1?platform=linux&arch=x64      
Error: Failed downloading the Cypress binary.
Response code: 403
Response message: Forbidden

有什么方法可以安装吗?

【问题讨论】:

  • 安装时尝试删除开发依赖

标签: npm installation cypress


【解决方案1】:

试试

npm config set registry http://registry.npmjs.org/

然后

npm install cypress --save-dev

【讨论】:

    【解决方案2】:

    尝试通过yarn安装

    yarn add cypress --dev

    【讨论】:

    • 是一样的。 DNS 的一些问题可能是由 docker 引起的,因为 docker restart 有帮助。
    【解决方案3】:

    对我也不起作用。我得到了同样的错误。我已经在 repo 中创建了新文件夹。

    • 运行 npm init -y
    • 运行 npm install --save-dev
    • 然后转到 ./node_modules/.bin/cypress 打开

    然后发出错误。我通过添加来解决它:

    {
      "scripts": {
        "test": "cypress open"
      }
    }
    

    进入 package.json 并使用 npm run test 运行 cypress

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-10-23
      • 1970-01-01
      • 2022-09-30
      • 2021-12-12
      • 1970-01-01
      • 2021-10-28
      相关资源
      最近更新 更多