Cypress: npm install failure

Created on 18 Mar 2020  路  10Comments  路  Source: cypress-io/cypress

Current behavior:

Brand new Windows 10 laptop. Trying to install Cypress via "npm install cypress --save-dev"
Get error messages (see below) referring to "This is related to npm not being able to find a file"
My node version is v12.16.1
My npm version is 6.13.4
I have tried various things, none of which helped:

  • running "npm init" to create a package.json file
  • creating an empty "node_modules" folder
  • creating by hand a package.json file with devDependencies of "cypress": "^4.1.0"
PS C:\Users\mrmic\Code\Cypress> npm install cypress --save-dev
npm ERR! code ENOENT
npm ERR! syscall spawn git
npm ERR! path git
npm ERR! errno ENOENT
npm ERR! enoent Error while executing:
npm ERR! enoent undefined ls-remote -h -t ssh://[email protected]/cypress-io/request.git
npm ERR! enoent
npm ERR! enoent
npm ERR! enoent spawn git ENOENT
npm ERR! enoent This is related to npm not being able to find a file.

2020-03-18T18_03_54_770Z-debug.log
2020-03-18T18_03_54_770Z-debug.log

Desired behavior:

Cypress installed.

Test code to reproduce


Versions


Trying to install whatever is the latest version of Cypress.
Windows 10.

Most helpful comment

just do npm install [email protected]

All 10 comments

I'm also finding the npm install hanging for the latest release, but earlier releases (e.g. 4.0.1) are installing ok

hi @wmyers, thanks for the tip - I also managed to install version 4.0.1 using npm. Explicitly:
npm install [email protected] --save-dev

just do npm install [email protected]

hi @wmyers, thanks for the tip, npm install [email protected] it works fine.

I think this is fixed by https://github.com/cypress-io/cypress/pull/6777 but that change has not been published yet.

Experiencing the same issue, just out of the blue 馃し鈥嶁檪

4.1.0 was the last working copy for people using a staging system like Sonar Nexus, manually adding binary packages for later versions is still not working due to seemingly-hardcoded call to cypress/request library:

Retrying git command: ls-remote -h -t https://github.com/cypress-io/request.git attempt # 2
(Git is installed)

For enterprise users that block github.com, i dont think #6777 would fix this.

Duplicate of https://github.com/cypress-io/cypress/issues/6752

This issue was introduced in 4.2.0 and will be fixed in our next release. Please roll back to 4.1.0 for now.

just do npm install [email protected]

please advise us whats the different between npm install [email protected]`
and command npm install cypress --save-dev

@marzoditch Please refer to npm install docs for specifics on how npm install command works: https://docs.npmjs.com/cli/install

Was this page helpful?
0 / 5 - 0 ratings