ABC123
ABC123

Reputation: 309

Cypress installation failed

I installed nodejs and npm on windows 10. Than I tried to install cypress via npm install cypress --save-dev and get the following Error:

> node index.js --exec install

The command "node" is either misspelled or
could not be found.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `node index.js --exec install`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\U\AppData\Roaming\npm-cache\_logs\2020-01-21T11_05_01_566Z-debug.log

After this I added the path %USERPROFILE%\AppData\Local\Temp to my system environment variables. But I get this error messages again. How can I fix this problem?

Upvotes: 10

Views: 18747

Answers (5)

AStyltsvig
AStyltsvig

Reputation: 69

Remember to actually run the npm command inside your folder with the package.json.

Upvotes: 0

Paschal Enyimiri
Paschal Enyimiri

Reputation: 19

Try this instead by installing the previous version but Explicitly: npm install [email protected] --save-dev

Upvotes: 1

Vinayak Shedgeri
Vinayak Shedgeri

Reputation: 2392

Download it in the any directory its a hack to download, if your proxy is properly configured and internet speed is good. it will download while doing npm install

wget https://cdn.cypress.io/desktop/7.6.0/win32-x64/cypress.zip

Provide the zip location

CYPRESS_INSTALL_BINARY=~/Downloads/cypress.zip npm install cypress

Upvotes: 2

Sai Sankar Mohanty
Sai Sankar Mohanty

Reputation: 11

Delete the package.json.

Again re build the package by npm init.

Install Cypress again by using npm install cypress --save-dev.

Upvotes: -2

Omar Alazzam
Omar Alazzam

Reputation: 21

try the following steps :

  1. install git on your machine and config it as global.

  2. delete old package.js then re-init new package.

  3. try again cypress install command

Upvotes: 2

Related Questions