当我尝试使用cypress open
或cypress run
时,出现以下错误:
✖ Verifying Cypress can run /*/*/.cache/Cypress/3.1.5/Cypress
→ Cypress Version: 3.1.5
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.
----------
Command failed: /*/*/.cache/Cypress/3.1.5/Cypress/Cypress --smoke-test --ping=984
----------
Platform: darwin (17.6.0)
Cypress Version: 3.1.5
错误中没有列出依赖项,并且我没有使用docker。我该怎么办?
答案 0 :(得分:1)
如果您是第一次使用赛普拉斯,只需尝试./node_modules/.bin/cypress install
。
答案 1 :(得分:0)
对我有用的一件事是取消设置NODE_OPTIONS
环境变量:
在MacOS上
unset NODE_OPTIONS
cypress open
在Windows上
set NODE_OPTIONS=
cypress open
如果失败,请按照user on Github的建议尝试以下操作:
在MacOS上:
/Users/[username]/Library/Caches/Cypress
npm i cypress -g
cypress open
在Windows上:
C:\Users[username]\AppData\Local\Cypress\Cache
)npm i cypress -g
cypress open