Reputation: 309
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
Reputation: 69
Remember to actually run the npm command inside your folder with the package.json.
Upvotes: 0
Reputation: 19
Try this instead by installing the previous version but Explicitly: npm install [email protected] --save-dev
Upvotes: 1
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
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
Reputation: 21
try the following steps :
install git on your machine and config it as global.
delete old package.js then re-init new package.
try again cypress install command
Upvotes: 2