cypress: macOS High Sierra fails to unzip Cypress on npm or Cypress install

Current behavior:

Upon running npm install cypress -D or cypress install, the “Unzipping Cypress” step fails with a permission denied error.

Additional Info (images, stack traces, etc)

screen shot 2018-03-21 at 9 44 12 am

  • Operating System: macOS High Sierra Version 10.13.3
  • Cypress Version: 2.1.0
  • Browser Version: N/A

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 5
  • Comments: 18 (3 by maintainers)

Most upvoted comments

@cbohatka-cardinal This is 100% a system permission issue. My guess is that you’ve installed node or npm with sudo. Did any of you install node with nvm? You could try that. It appears you installed a system wide node, which is not recommended.

The error EACCES is coming from node when we try to access the zip that we just downloaded. I don’t believe there’s anything Cypress can do about it - the binary app and CLI is downloaded 10,000+ times a day on all 3 operating systems so I don’t think there’s anything that’s on our end.

You can try running DEBUG=cypress:* npm install cypress to reinstall the binary and see what happens.

You can also try using version 3.x.x of Cypress since we changed how the binary is cached and installed. I’m going to close this issue as there’s no way we can reproduce this since it’s too specific to your systems.

Use this commnad:

sudo npm install --unsafe-perm=true --allow-root

The error I got was

The Cypress App could not be unzipped. Search for an existing issue or open a GitHub issue at https://github.com/cypress-io/cypress/issues Error: EACCES: permission denied, open ‘/var/folders/55/0jxw37m90fnfqstyt4pzr1n80000gp/T/cypress.zip’ Platform: darwin (17.7.0) Cypress Version: 3.0.2

This is after I uninstalled all global versions of Node/NPM and re-installed them using NVM.

I checked the folder for the cypress.zip file named T, and it seems it has an extended attribute com.apple.rootless which has to do with Apple’s System Integrity Protection.

$ xattr T
com.apple.rootless

I suspect this is what’s preventing Cypress/NPM from automatically unzipping the file. Is there a way for Cypress to download the file into another folder which doesn’t have the rootless attribute?