Not able to install cypress on windows 10 - node.js

Above is the attached picture of the problem I got. I have installed Nodejs and run npm install command to create a package.json file in the cypress folder but was still not able to install it.

Try this
npm config set registry http://registry.npmjs.org/
so that npm requests for http url instead of https.
and then try the same npm install command
clear your cache by doing npm cache clean.
NOTE can lead to a security problem since https is not used here. I don't recommend to use this on production.
If the above mentioned doesn't work:-
1)ping registry.npmjs.org
2)I was able to solve this by running the following command:
npm config delete proxy
npm config delete http-proxy
npm config delete https-proxy
If this method did not work, disabling your router's firewall would solve the issue immediately.
ETIMEDOUT Error while installing Node packages on Windows

Please follow the below steps to fix,
npm config set proxy false
npm cache clean --force
npm install cypress
Hope it will fix your installation issue.

I'm also finding the npm install cypress command to be not working.
A workaround is to use npm install cypress#4.0.1.

Related

get an error while trying to run create-react-app [duplicate]

I am getting this error while running sudo npm install. On my server, npm was installed earlier. I've tried to delete the package-lock.json file, and ran npm cache clean --force, but it didn't work.
My npm version is 5.3.0.
The error:
npm ERR! code EINTEGRITY
npm ERR! sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA== integrity checksum failed when using sha512: wanted sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA== but got sha512-WXI95kpJrxw4Nnx8vVI90PuUhrQjnNgghBl5tn54rUNKZYbxv+4ACxUzPVpJEtWxKmeDwnQrzjc0C2bYmRJVKg==. (65117 bytes)
npm ERR! A complete log of this run can be found in:
npm ERR! /home/ubuntu/.npm/_logs/2017-11-29T05_33_52_182Z-debug.log
See https://github.com/npm/npm/issues/16861
This worked for me:
npm cache verify
Then I re-ran:
npm install -g create-react-app
And it installed as expected: Issue resolved.
Other solutions mentioned in the GitHub issue include:
npm cache clean --force
OR
Deleting npm and npm-cache folders in Users%username%\AppData\Roaming (Windows 7 and Windows 10) and running npm install
OR
Update npm by via npm i -g npm
OR
Delete package-lock.json
OR
npm cache clean
OR
Do these steps to fix the problem:
Find all outdated packages and update theme:
npm outdated -g
sudo npm i -g outDatedPKG
Upgrade npm to latest version with:
sudo npm i -g npm
Delete package-lock.json file.
Delete _cacache directory in ~/.npm:
npm cache verify
Every time I get that error, do steps 2 & 3.
If you still get the error, clear npm's cache:
npm cache clean --force
OR
Add proxy to .npmrc in ~ directory:
proxy=http://localhost:8123
https-proxy=http://localhost:8123
Try again! slow internet connection and censorship may cause this ugly problem.
OR
npm cache clear --force && npm install --no-shrinkwrap --update-binary
OR
npm config set package-lock false
Delete package-lock.json file and then try to install
The issue was indeed in package-lock.json, and after replacing it with a working version from another branch it worked.
What's interesting is seeing the diff:
So there really is some integrity checksum in the package-lock.json and it was replaced in our package-lock.json with a SHA1 instead of a SHA-512 checksum. See here for more info.
In case you don't have a working version in another branch. Consider the message
npm ERR! code EINTEGRITY
npm ERR!
sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==
integrity checksum failed when using sha512: wanted
sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==
but got
sha512-WXI95kpJrxw4Nnx8vVI90PuUhrQjnNgghBl5tn54rUNKZYbxv+4ACxUzPVpJEtWxKmeDwnQrzjc0C2bYmRJVKg==
. (65117 bytes)
Find the package in package-lock.json using the first checksum:
sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==
and put the third checksum into its "integrity" field:
sha512-WXI95kpJrxw4Nnx8vVI90PuUhrQjnNgghBl5tn54rUNKZYbxv+4ACxUzPVpJEtWxKmeDwnQrzjc0C2bYmRJVKg==
A more detailed description is here.
Actually the above is related to the network connectivity in side the server. When I've good connectivity in the server, the npm install gone good and didn't throw any error
My problem was 2 things:
Bad package-lock.json file
The existance of npm-shrinkwrap.json together with the package-lock.json file
What i did is:
Deleted the package-lock.json file
Delete the npm-shrinkwrap.json file
Ran npm install again (which recreated a good package-lock file)
Fixed my error!
I was stuck at this for a long time and this is what helped me.
Try this:
npm cache clean --force
npm install --update-binary --no-shrinkwrap
Found this answer after digging into GitHub issues!!
As a workaround, follow the below steps:
Go to the project directory
Remove the node_modules directory: rm -rf node_modules
Remove package-lock.json file: rm package-lock.json
Clear the cache: npm cache clean --force
Run npm install --verbose
If after following the above steps still the issue exists then please provide us the output of installation command with --verbose.
There are several valid and helpful responses here, but I would like to add that in my case the simplest solution was:
Delete package-lock.json;
Remove folder AppData\Local\npm\cache or AppData\Roaming\npm\cache;
Remove folder node_modules.staging;
Run npm install again.
After that everything ran smoothly.
I had a very similar problem, and in my case it worked by doing:
npm clean
This is the nuclear option since it clears every package from the cache as expained here.
Try the following:
npm cache clean --force
This has worked for me.
This Worked for me .
open the project in CMD
the run
npm cache verify
npm install
npm start
I was using private npm registry and trying to install private npm module. Logging to npm local registry fixed it (used command npm --add-user)
SherylHohman's answer solved the issue I had, but only after I switched my internet connection. Intitially, I was on the hard-line connection at work, and I switched to the WiFi connection at work, but that still didn't work.
As a last resort, I switched my WiFi to a pocket-WiFi, and running the following worked well:
npm cache verify
npm install -g create-react-app
create-react-app app-name
Hope this helps others.
I am behind my organization's proxy, running the following commands fixed the issue for me
npm config set proxy http://proxy.yourproxydomain.com:port
npm config set https-proxy http://proxy.yourproxydomain.com:port
npm config set strict-ssl false
npm config set registry https://registry.npmjs.org/
Updating .npmrc and the registry to https:// worked for me
registry=https://registry.npmjs.org/
This was not yet mentioned but make sure that your SYSTEM TIME is correct. If it is too out of sync it will cause a EINTEGRITY error. When you are doing npm publish / install.
None of the above answers worked for me. The solution to my issue was to change the way the snapshot dependency was consumed inside the package.json. Use the following template to pull in the snapshot dependency that you need
"dependency": "git+http://github.com/[pathtoproject].git#[branchname]",
I had the same issue. I used yarn instead of npm to install the dependencies and it worked.
yarn add *****
After going through all the answers and executing most of them. Although I resisted to try the Restart magic, eventually, the issue is solved after restart on my macbook(MacOS Catalina Ver. 10.15.7).
It seems like a cache issue indeed but none of the commands that I have executed cleared the cache.
What worked for me was npm cache verify then re-run your command. All should be good.
Updating the .npmrc files' entries for scoped and un-scoped packages worked for me.
So I ended up using the
npm config set #scope_name:registry SCOPED_REGISTRY_URL
and
npm config set registry PUBLIC_REGISTRY_URL
You should check Connection-specific DNS Suffix when type “ipconfig” or “ifconfig” in terminal
I faced same issue. Plus while I was trying to resolve from picking solutions from other devs, I faced few more issues like one listed here.
Angular 9 ng new myapp gives error The Schematic workflow failed
https://medium.com/#codewin/npm-warn-deprecated-request-2-88-2-b6da20766fd7
Finally after trying cache clean and verify and reinstall node of different versions and npm update, nvm and many other solution like set proxy and better internet connection, I still could not arrive to a resolve.
What worked for me is : I browsed a bit inside my C:\Users--- folder, I found package-lock.json and .npmrc files. I deleted those and reinstalled angular and tried. npm install and uninstall of different modules started working.
Before i was running this command
npm install typescript -g
after changing the command it worked perfectly.
npm install -g typescript
I faced this issue. It was my network connectivity. I changed network (from Broadband WiFi to 4G WiFi) and tried. It worked.
My broadband ISP was blocking all http requests. That might be the reason I guess in my case.
all solutions failed for me till i checked router settings; it was set to only IPV4.. i changed and put ipv4v6 and all is working fine now.
In my case the sha command was missing from my linux distro; steps were
added the packages for sha512 (on my distro sudo apt install hashalot)
npm cache verify
rm -rf node_modules
npm install
Easy and fast fix for me was to npm install the specific package on which it said the sha is wrong. Say your package is called awesome-package.
My solution was:
npm i awesome-package
This updated my sha within the package-lock.json.
If none of the above solved your problem, then just upgrade your npm verion and try. It worked for me.
Updating nodejs version worked for me.
curl -fsSL https://deb.nodesource.com/setup_12.x | sudo -E bash -
sudo apt-get install -y nodejs

When I run `npm install`, it returns with `ERR! code EINTEGRITY` (npm 5.3.0)

I am getting this error while running sudo npm install. On my server, npm was installed earlier. I've tried to delete the package-lock.json file, and ran npm cache clean --force, but it didn't work.
My npm version is 5.3.0.
The error:
npm ERR! code EINTEGRITY
npm ERR! sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA== integrity checksum failed when using sha512: wanted sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA== but got sha512-WXI95kpJrxw4Nnx8vVI90PuUhrQjnNgghBl5tn54rUNKZYbxv+4ACxUzPVpJEtWxKmeDwnQrzjc0C2bYmRJVKg==. (65117 bytes)
npm ERR! A complete log of this run can be found in:
npm ERR! /home/ubuntu/.npm/_logs/2017-11-29T05_33_52_182Z-debug.log
See https://github.com/npm/npm/issues/16861
This worked for me:
npm cache verify
Then I re-ran:
npm install -g create-react-app
And it installed as expected: Issue resolved.
Other solutions mentioned in the GitHub issue include:
npm cache clean --force
OR
Deleting npm and npm-cache folders in Users%username%\AppData\Roaming (Windows 7 and Windows 10) and running npm install
OR
Update npm by via npm i -g npm
OR
Delete package-lock.json
OR
npm cache clean
OR
Do these steps to fix the problem:
Find all outdated packages and update theme:
npm outdated -g
sudo npm i -g outDatedPKG
Upgrade npm to latest version with:
sudo npm i -g npm
Delete package-lock.json file.
Delete _cacache directory in ~/.npm:
npm cache verify
Every time I get that error, do steps 2 & 3.
If you still get the error, clear npm's cache:
npm cache clean --force
OR
Add proxy to .npmrc in ~ directory:
proxy=http://localhost:8123
https-proxy=http://localhost:8123
Try again! slow internet connection and censorship may cause this ugly problem.
OR
npm cache clear --force && npm install --no-shrinkwrap --update-binary
OR
npm config set package-lock false
Delete package-lock.json file and then try to install
The issue was indeed in package-lock.json, and after replacing it with a working version from another branch it worked.
What's interesting is seeing the diff:
So there really is some integrity checksum in the package-lock.json and it was replaced in our package-lock.json with a SHA1 instead of a SHA-512 checksum. See here for more info.
In case you don't have a working version in another branch. Consider the message
npm ERR! code EINTEGRITY
npm ERR!
sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==
integrity checksum failed when using sha512: wanted
sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==
but got
sha512-WXI95kpJrxw4Nnx8vVI90PuUhrQjnNgghBl5tn54rUNKZYbxv+4ACxUzPVpJEtWxKmeDwnQrzjc0C2bYmRJVKg==
. (65117 bytes)
Find the package in package-lock.json using the first checksum:
sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==
and put the third checksum into its "integrity" field:
sha512-WXI95kpJrxw4Nnx8vVI90PuUhrQjnNgghBl5tn54rUNKZYbxv+4ACxUzPVpJEtWxKmeDwnQrzjc0C2bYmRJVKg==
A more detailed description is here.
Actually the above is related to the network connectivity in side the server. When I've good connectivity in the server, the npm install gone good and didn't throw any error
My problem was 2 things:
Bad package-lock.json file
The existance of npm-shrinkwrap.json together with the package-lock.json file
What i did is:
Deleted the package-lock.json file
Delete the npm-shrinkwrap.json file
Ran npm install again (which recreated a good package-lock file)
Fixed my error!
I was stuck at this for a long time and this is what helped me.
Try this:
npm cache clean --force
npm install --update-binary --no-shrinkwrap
Found this answer after digging into GitHub issues!!
As a workaround, follow the below steps:
Go to the project directory
Remove the node_modules directory: rm -rf node_modules
Remove package-lock.json file: rm package-lock.json
Clear the cache: npm cache clean --force
Run npm install --verbose
If after following the above steps still the issue exists then please provide us the output of installation command with --verbose.
There are several valid and helpful responses here, but I would like to add that in my case the simplest solution was:
Delete package-lock.json;
Remove folder AppData\Local\npm\cache or AppData\Roaming\npm\cache;
Remove folder node_modules.staging;
Run npm install again.
After that everything ran smoothly.
I had a very similar problem, and in my case it worked by doing:
npm clean
This is the nuclear option since it clears every package from the cache as expained here.
Try the following:
npm cache clean --force
This has worked for me.
This Worked for me .
open the project in CMD
the run
npm cache verify
npm install
npm start
I was using private npm registry and trying to install private npm module. Logging to npm local registry fixed it (used command npm --add-user)
SherylHohman's answer solved the issue I had, but only after I switched my internet connection. Intitially, I was on the hard-line connection at work, and I switched to the WiFi connection at work, but that still didn't work.
As a last resort, I switched my WiFi to a pocket-WiFi, and running the following worked well:
npm cache verify
npm install -g create-react-app
create-react-app app-name
Hope this helps others.
I am behind my organization's proxy, running the following commands fixed the issue for me
npm config set proxy http://proxy.yourproxydomain.com:port
npm config set https-proxy http://proxy.yourproxydomain.com:port
npm config set strict-ssl false
npm config set registry https://registry.npmjs.org/
Updating .npmrc and the registry to https:// worked for me
registry=https://registry.npmjs.org/
This was not yet mentioned but make sure that your SYSTEM TIME is correct. If it is too out of sync it will cause a EINTEGRITY error. When you are doing npm publish / install.
None of the above answers worked for me. The solution to my issue was to change the way the snapshot dependency was consumed inside the package.json. Use the following template to pull in the snapshot dependency that you need
"dependency": "git+http://github.com/[pathtoproject].git#[branchname]",
I had the same issue. I used yarn instead of npm to install the dependencies and it worked.
yarn add *****
After going through all the answers and executing most of them. Although I resisted to try the Restart magic, eventually, the issue is solved after restart on my macbook(MacOS Catalina Ver. 10.15.7).
It seems like a cache issue indeed but none of the commands that I have executed cleared the cache.
What worked for me was npm cache verify then re-run your command. All should be good.
Updating the .npmrc files' entries for scoped and un-scoped packages worked for me.
So I ended up using the
npm config set #scope_name:registry SCOPED_REGISTRY_URL
and
npm config set registry PUBLIC_REGISTRY_URL
You should check Connection-specific DNS Suffix when type “ipconfig” or “ifconfig” in terminal
I faced same issue. Plus while I was trying to resolve from picking solutions from other devs, I faced few more issues like one listed here.
Angular 9 ng new myapp gives error The Schematic workflow failed
https://medium.com/#codewin/npm-warn-deprecated-request-2-88-2-b6da20766fd7
Finally after trying cache clean and verify and reinstall node of different versions and npm update, nvm and many other solution like set proxy and better internet connection, I still could not arrive to a resolve.
What worked for me is : I browsed a bit inside my C:\Users--- folder, I found package-lock.json and .npmrc files. I deleted those and reinstalled angular and tried. npm install and uninstall of different modules started working.
Before i was running this command
npm install typescript -g
after changing the command it worked perfectly.
npm install -g typescript
I faced this issue. It was my network connectivity. I changed network (from Broadband WiFi to 4G WiFi) and tried. It worked.
My broadband ISP was blocking all http requests. That might be the reason I guess in my case.
all solutions failed for me till i checked router settings; it was set to only IPV4.. i changed and put ipv4v6 and all is working fine now.
In my case the sha command was missing from my linux distro; steps were
added the packages for sha512 (on my distro sudo apt install hashalot)
npm cache verify
rm -rf node_modules
npm install
Easy and fast fix for me was to npm install the specific package on which it said the sha is wrong. Say your package is called awesome-package.
My solution was:
npm i awesome-package
This updated my sha within the package-lock.json.
If none of the above solved your problem, then just upgrade your npm verion and try. It worked for me.
Updating nodejs version worked for me.
curl -fsSL https://deb.nodesource.com/setup_12.x | sudo -E bash -
sudo apt-get install -y nodejs

Node.js npm install ETIMEDOUT

I am trying to run a demo program.
As per the instruction I have to run the command npm install, which install all the dependencies but facing the problem as below
Try the following command, it changes the registry's protocol from https to http.
npm config set registry http://registry.npmjs.org/
Please try
npm config set proxy null
It worked for me on date I posted this.

NPM does not install anything : it hangs

Whenever I want to install a module with NPM, it hangs at that stage:
npm install express
npm http GET https://registry.npmjs.org/express
And that's it. It has that behavior for anything I input instead of express. I installed nodejs and nvm that way (Ubuntu 13.10):
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs
I tried looking on the Internet and GitHub and I found a closed issue about npm hanging forever when trying to install a module.. but it was a really old issue. Before I ask the developers, am I missing something obvious ?
I tried compiling both nodejs and npm but the result was the same.
EDIT: npm install express -verbose -> http://pastebin.com/tGY3V6Ly
Error:
npm info retry will retry, error on last attempt: Error: tunneling socket could not be established, cause=140072708810560:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:../deps/openssl/openssl/ssl/s23_clnt.c:766:
NPM has been having server issues of late. Try running the command with -verbose to check and see what is going on, and be patient.
It is likely of proxy problem. I didn't set proxy but somewhow this worked for me
npm config delete proxy
npm config delete https-proxy
npm set registry https://registry.npmjs.org/
I had this issue on a BeagleBone Black (low power ARM device) and running npm cache clean seemed to get things moving again.
Try without https:
npm config set registry http://registry.npmjs.org/
I had the same issue and I solved by disabling all my firewalls
After an hour of struggling, I cleaned .npm and node_modesl/.staging directories, and problem just gone!
(replace the paths with your own)
yes|rm /root/.npm/* -R
yes|rm /path/to/node_modules/.staging/* -R
npm install
For me, this is what worked:
npm cache clean
And then I reloaded the terminal window and ran npm install again.
I opened console with admin privileges and the ran npm install on windows. My problem was fixed with this
I had the same error and the problem was in proxy: previously I set up HTTP_PROXY environment variable and after removing it npm install completed without any error.
I had this problem inside a Windows git bash terminal - reinstalling the latest version of git bash fixed it
I was using an older version of node. I used a newer version
Type in Terminal:
nvm use stable
and then
npm i
and all worked just fine.
Just found out that the "Killer network suite" was why this wasn't working.
I don't know why but it was throttling connection to the server.

Manually installing NPM packages

I used the node windows installer v0.8.3 to install nodejs.
When I try to install express like this:
npm install express
It's not working. I think that is because my company is using a proxy, so I downloaded express from github https://github.com/visionmedia/express, but I don't know how to install.
I unzip the file and put them in F/express/. Please help me? I'm on Windows
When I try to install from F:/express/ using the following commands
cd F:/express
npm install ./express
or
npm install .
I get the following error:
error: connect ETIMEDOUT
at errnoException (net.js:776:11)
at Object.afterConnect [as oncomplete] (net.js:767:19)
And when when I try to do
npm install F:/express
It shows
express#3.0.0beta7 prepublish F:/express/
npm prune
followed by lots of http get messages and then the same error
express itself has a lot of dependencies which I believe npm also tries to retrieve if you issue npm install. I think you should just configure proxy properly => http://jjasonclark.com/how-to-setup-node-behind-web-proxy?
It would probably be most convenient long-term to configure NPM to use the aforementioned proxy through one of the following methods (In the following, replace $PROXY with your proxy in the form $PROTOCOL://$DOMAIN:$PORT (e.g. http://proxy.server:80))
A. Set the environment variables http_proxy and https_proxy to $PROXY
B.
npm set proxy $PROXY
npm set https-proxy $PROXY
If you have trouble getting packages because of a proxy or other internet connection problem then set up the project on another machine. Then copy the project over to your target. It will have all the files that you need.
Try npm install .\express (assuming the express folder is in the current folder).
The problem is that express in npm install express is parsed as a package name, while .\express in npm install .\express is parsed as a folder name.
You will want to run npm install . from within your F:/express/ folder (or npm install -g . for a global install).
It looks like you downloaded beta version (3.0.0beta7). Try installing the latest stable version (2.5.11):
npm install https://github.com/visionmedia/express/tarball/2.5.11

Resources