cypress: Win 10 - symlink - operation not permitted, symlink

Current behavior:

Unable to install cypress on Windows 10.

Desired behavior:

Computers on my company cannot run cmd as administrator to resolve symlink problems. Is it possible to provide a way to install Cypress without global cache directory ?

Test code to reproduce

> npm install --save cypress
  √  Downloaded Cypress
  ×  Unzipping Cypress        4% 130s
    → Cypress Version: 5.1.0
     Finishing Installation
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: EPERM: operation not permitted, symlink '..\..\..\esprima\bin\esvalidate.js' -> 'C:\_cache\cypress\5.1.0\Cypress.app\Contents\Resources\app\packages\rewriter\node_modules\recast\node_modules\.bin\esvalidate'

----------

Platform: win32 (10.0.18363)
Cypress Version: 5.1.0

Versions

Node JS: 12.13.0 Cypress: 5.1.0 Operating system: Windows 10 (10.0.18363)

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 7
  • Comments: 44 (19 by maintainers)

Most upvoted comments

@MikeMcC399 Yes, I can do that. Note: I wouldn’t be the best ‘user’ of this since I’m not the person that actually sets up the mirror. I just think it’d be a good idea on the Cypress side to have better documentation in that area

Edit: Created new issue https://github.com/cypress-io/cypress-documentation/issues/5290

@aarowman

I found the missing debug log instructions! If you could execute the following in a Git Bash terminal, it should show exactly what is happening and where it is failing:

export DEBUG='cypress:*'
npm install cypress@latest --loglevel verbose --foreground-scripts

If you have previously been successful installing then you may need to execute the following first:

npx cypress cache clear
npm uninstall cypress

@AtofStryker

I think you are going a fantastic job responding to this issue.

Thanks for the compliment and for your participation! As always it’s a teamwork thing to get to the bottom of these issues. No single person has all the answers!

@MikeMcC399 @AtofStryker The install does appear to work when running as admin (using Git Bash), so it seems like a permission issue. The rest of the npm install works fine for other dependencies. The cache is pointing to user AppData, which should be owned by the local user.

Why does Cypress require admin to unzip the file?

I see in this code: https://github.com/cypress-io/cypress/blob/7ef4300a6b1a367f980e5d6a0182dac292694d01/cli/lib/tasks/install.js#LL345C2-L345C34 const downloadDir = os.tmpdir() Doesn’t that also download to AppData by default? So the download should be in a location that the local user can use to unzip.