首次尝试在 Visual Studio 代码中运行 Cypress 时,我收到以下输出:
It looks like this is your first time using Cypress: 6.4.0
× Verifying Cypress can run C:\Users\username\AppData\Local\Cypress\Cache\6.4.0\Cypress
? Cypress Version: 6.4.0
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.
----------
#
Fatal error in , line 0
Failed to deserialize the V8 snapshot blob. This can mean that the snapshot blob file is corrupted or missing.
Run Code Online (Sandbox Code Playgroud)
如何解决这个问题,以便赛普拉斯运行并执行应用程序的测试?
小智 17
您还可以修剪缓存,因为这是许多版本的已知问题。
./node_modules/.bin/cypress cache clear
Run Code Online (Sandbox Code Playgroud)
然后运行
./node_modules/.bin/cypress install --force
Run Code Online (Sandbox Code Playgroud)
这对我有用。
Windows(我的例子中是 10 个)用户请注意:要运行上面的命令,您必须允许在终端上发布控制台脚本执行策略。为此,Set-ExecutionPolicy RemoteSigned -Scope Process终端必须以管理员权限运行。
我在这个GitHub 问题中找到了适用于我的案例的解决方案
解决方案是重命名 Cypress 缓存,然后从应用程序目录重新安装 Cypress。
On Windows, the Cypress cache is in \AppData\Local\Cypress\Cache
npm install cypress
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
4444 次 |
| 最近记录: |