赛普拉斯无法启动 Windows

时间:2021-05-16 15:35:22

标签: cypress

我已经在我的 Windows 10 机器上安装了 Cypress。
在 VSCode 终端窗口中的项目文件夹中,我首先运行 npm init -y 然后我运行以下命令 npm install cypress --force 然后我运行命令 npx cypress open 我收到以下错误

PS C:\Projects\Cypress Projects\QACypressDemo> npm install cypress --force
npm WARN using --force Recommended protections disabled.
npm WARN deprecated har-validator@5.1.5: this library is no longer supported

added 219 packages, and audited 220 packages in 37s

16 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
PS C:\Projects\Cypress Projects\QACypressDemo> npx cypress open
It looks like this is your first time using Cypress: 7.3.0

  ×  Verifying Cypress can run C:\Users\Usera\AppData\Local\Cypress\Cache\7.3.0\Cypress
    → Cypress Version: 7.3.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.
#
#
#
#FailureMessage Object: 000000BA300FEE30
1: 00007FF6C6C8BCCF node::OnFatalError+69935
2: 00007FF6C1AFE6CA Ordinal0+59082
3: 00007FF6C20ACEC8 v8::Isolate::Initialize+744
4: 00007FF6C2B6D48F v8::Isolate::AddMessageListenerWithErrorLevel+1039
5: 00007FF6C56D7583 std::__1::vector<v8::CpuProfileDeoptInfo,std::__1::allocator<v8::CpuProfileDeoptInfo> >::max_size+857811
6: 00007FF6C56CF89B std::__1::vector<v8::CpuProfileDeoptInfo,std::__1::allocator<v8::CpuProfileDeoptInfo> >::max_size+825835
7: 00007FF6C60DA382 v8_inspector::protocol::Binary::operator=+2434098
8: 00007FF6C60DDC29 v8_inspector::protocol::Binary::operator=+2448601
9: 00007FF6C60D9E12 v8_inspector::protocol::Binary::operator=+2432706
10: 00007FF6C5DFB2D0 v8::ExtensionConfiguration::ExtensionConfiguration+2964624
11: 00007FF6C5DFAEEA v8::ExtensionConfiguration::ExtensionConfiguration+2963626
12: 00007FF6C5DF9E57 v8::ExtensionConfiguration::ExtensionConfiguration+2959383
13: 00007FF6C5DFA17D v8::ExtensionConfiguration::ExtensionConfiguration+2960189
14: 00007FF6C5603167 uv_sleep+2434663
15: 00007FF6C803FF02 uv_random+10012786
16: 00007FFFCF1937E4 BaseThreadInitThunk+20
17: 00007FFFD10ECB81 RtlUserThreadStart+33

----------

Platform: win32 (10.0.16299)
Cypress Version: 7.3.0

我尝试从中删除 Cypress 文件夹并再次运行安装命令。赛普拉斯仍然无法运行 C:\Users\Usera\AppData\Local\cypress

不知道为什么 Cypress 不会运行,测试运行器不会打开。有任何想法吗。谢谢。

2 个答案:

答案 0 :(得分:1)

当安装中途中断时,我遇到过这样的问题。您可以clear the cache 并重新安装它。我使用了以下顺序:

cypress cache clear
npm install cypress --save-dev

答案 1 :(得分:1)

npm installnpx cypress 在两个不同的位置运行二进制文件。如果要使用安装到目录中的二进制文件,则需要运行在节点模块文件夹中找到的二进制文件。在 Windows 上,如果您运行 ./node_modules/.bin/cypress,应该会在您的节点模块文件夹中启动该版本。