【发布时间】:2021-06-23 14:32:45
【问题描述】:
我试图在 cypress 中创建一个新项目,但收到以下奇怪的错误消息。
步骤:
- npm init -y
- npm install cypress --save-dev
然后我做了npx open cypress,我从控制台收到以下消息
我该如何解决这个问题?
Cypress cannot run because this binary file does not have executable permissions here:
/Users/myName/Library/Caches/Cypress/7.5.0/Cypress.app/Contents/MacOS/Cypress
Reasons this may happen:
- node was installed as 'root' or with 'sudo'
- the cypress npm package as 'root' or with 'sudo'
Please check that you have the appropriate user permissions.
You can also try clearing the cache with 'cypress cache clear' and reinstalling.
----------
Platform: darwin (20.5.0)
Cypress Version: 7.5.0
【问题讨论】:
-
你用 sudo 安装了 npm 吗?
-
我不记得我可能有。怎么查?
-
你能跑
npm -v吗? -
版本号 7.12.1
标签: automation cypress