【问题标题】:Cypress failed to start Windows赛普拉斯无法启动 Windows
【发布时间】:2021-05-16 15:35:22
【问题描述】:

我已经在我的 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 无法运行,测试运行器无法打开。有任何想法吗。谢谢。

【问题讨论】:

    标签: cypress


    【解决方案1】:

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

    cypress cache clear
    npm install cypress --save-dev
    

    【讨论】:

    • 'npx cypress 缓存清除'
    【解决方案2】:

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

    【讨论】:

      猜你喜欢
      • 2018-06-27
      • 1970-01-01
      • 2020-12-23
      • 2021-12-02
      • 2021-07-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多