简体   繁体   English

赛普拉斯无法在 Windows 上启动

[英]Cypress failed to start on Windows

I have just installed Cypress using "npm install cypress --save-dev" and got confirmation that the install was successful as detailed below我刚刚使用“npm install cypress --save-dev”安装了赛普拉斯,并确认安装成功,详情如下

  • Downloaded Cypress下载赛普拉斯
  • Unzipped Cypress解压柏树
  • Finished installation安装完成

Tried opening Cypress using the prompt: node_modules.bin\\cypress open but got the below message but there was no error listed.尝试使用提示打开赛普拉斯: node_modules.bin\\cypress open 但得到以下消息但没有列出错误。 Has anyone come across this?有没有人遇到过这个?

"It looks like this is your first time using Cypress: 1.4.1 “看起来这是您第一次使用 Cypress:1.4.1

→ Cypress Version: 1.4.1 Cypress failed to start. → Cypress 版本:1.4.1 Cypress 无法启动。

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 https://on.cypress.io/required-dependencies

If you using Docker, we provide containers with all required dependencies installed.如果您使用 Docker,我们会提供安装了所有必需依赖项的容器。


Platform: win32 (10.0.14393) Cypress Version: 1.4.1"平台:win32 (10.0.14393) Cypress 版本:1.4.1"

I've had the same issue.我有同样的问题。 After running运行后

npm install --save-dev cypress

you need to run你需要跑

.\node_modules\.bin\cypress.cmd install

That's a bit confusing in most install guides that I read.在我阅读的大多数安装指南中,这有点令人困惑。 After doing this, it worked for me.这样做后,它对我有用。

试试这个npx cypress install --force然后使用npx cypress open

Try the following, as mentioned here试试以下,提到这里

set NODE_OPTIONS=
cypress run

Add below code of line in package.json filepackage.json文件中添加以下代码行

{
  "scripts": {
    "test": "cypress open"
  }
}

and run cypress thro' editor command prompt using below command prompt并使用以下命令提示符运行 cypress thro' 编辑器命令提示符

npm run test

看起来您缺少库或依赖项,只需运行: npm install即可安装项目中所需的所有缺少的库和依赖项。

I hope you must have sorted out the issue.我希望你一定已经解决了这个问题。

If not, try to delete the cache and rerun cypress.如果没有,请尝试删除缓存并重新运行 cypress。 It should work.它应该工作。 If you use mac, run below command before running cypress open.如果您使用 mac,请在运行 cypress open 之前运行以下命令。

/Users/<username>/Library/Caches/Cypress/

You may have already solved this, however, if not try downloading the binary from download.cypress.io/desktop您可能已经解决了这个问题,但是,如果没有尝试从download.cypress.io/desktop下载二进制文件

Direct download直接下载

If you're not using Node.js or npm in your project or you just want to try Cypress out quickly, you can always download Cypress directly from our CDN.如果您没有在项目中使用 Node.js 或 npm,或者您只想快速试用 Cypress,您可以随时直接从我们的 CDN 下载 Cypress。

The direct download will always grab the latest available version.直接下载将始终获取最新的可用版本。 Your platform will be detected automatically.您的平台将被自动检测。

Just manually unzip and double click.只需手动解压缩并双击即可。 Cypress will run without needing to install any dependencies. Cypress 无需安装任何依赖项即可运行。

Ref: https://docs.cypress.io/guides/getting-started/installing-cypress.html#Direct-download参考: https : //docs.cypress.io/guides/getting-started/installing-cypress.html#Direct-download

.\node_modules\.bin\cypress.cmd install --force

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM