我正在尝试使用二进制安装Cypress。当前使用下面的命令在vs代码:CYPRESS_INSTALL_BINARY=C:\Users\abcd\Downloads\cypress.zip npm install cypress
图片来源:www.example.comhttps://docs.cypress.io/guides/getting-started/installing-cypress.html#Install-binary
这对我不起作用,显示以下错误:
CYPRESS_INSTALL_BINARY=C:\Users\abcd\Downloads\cypress.zip : The term 'CYPRESS_INSTALL_BINARY=C:\Users\abcd\Downloads\cypress.zip' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ CYPRESS_INSTALL_BINARY=C:\Users\abcd\Downloads\cypress.zip npm ins ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (CYPRESS_INSTALL...ads\cypress.zip:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
有人能帮我修一下吗?谢谢!
3条答案
按热度按时间btxsgosb1#
我用几个npm命令修复了这个问题:
现在,npm运行e2e执行所有3项操作
zengzsys2#
试试这个-
ippsafx73#
Cypress二进制安装
安装与默认npm程序包不同的版本。
CYPRESS_INSTALL_BINARY=2.0.1 npm install cypress@2.0.3
指定外部URL(绕过公司防火墙)。
CYPRESS_INSTALL_BINARY=https://company.domain.com/cypress.zip npm install cypress
指定要在本地安装而不使用Internet安装的文件。
CYPRESS_INSTALL_BINARY=/local/path/to/cypress.zip npm install cypress
通过将UNIX设置为Windows cmd上的路径,使其工作
SET CYPRESS_INSTALL_BINARY=C:/Users/myUserName/Downloads/cypress.zip