【问题标题】:How to install Cypress from local zip file using npm如何使用 npm 从本地 zip 文件安装 Cypress
【发布时间】:2021-07-13 01:11:55
【问题描述】:

我想使用 npm 安装 Cypress - 但我的公司防火墙被阻止。

所以我在 Visual Studio Code 的终端中尝试了以下方法 - 但出现错误(粘贴在下面)

知道为什么这个脚本不起作用吗?以及解决方法?

PS C:\Users\c64881a\Desktop\NPM_Cypress> CYPRESS_INSTALL_BINARY=C:/Users/c64881a/Downloads/cypress.zip npm install cypress

CYPRESS_INSTALL_BINARY=C:/Users/c64881a/Downloads/cypress.zip :术语“CYPRESS_INSTALL_BINARY=C:/Users/c64881a/Downloads/cypress.zip”未被识别为 cmdlet、函数、脚本文件或可运行程序的名称。检查名称的拼写,如果包含路径,请验证路径是否正确
然后再试一次。 在 line:1 char:1

  • CYPRESS_INSTALL_BINARY=C:/Users/c64881a/Downloads/cypress.zip npm ins ...
  •   + CategoryInfo          : ObjectNotFound: (CYPRESS_INSTALL...ads/cypress.zip:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
    

【问题讨论】:

  • 这不是你在 Windows 上设置环境变量的方式。
  • 也许尝试将 cypress.zip 的路径放在引号中?看起来你在 powershell 中,尝试使用 cmd.exe

标签: installation cypress


【解决方案1】:

请在 PowerShell 中试试这个:

setx CYPRESS_INSTALL_BINARY C:/Users/c64881a/Downloads/cypress.zip

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2019-11-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-07-15
    • 1970-01-01
    • 2013-05-20
    • 1970-01-01
    相关资源
    最近更新 更多