while installing cypress through command :npm install cypress --save-dev getting error as The Cypress App could not be downloaded - npm-install

while installing cypress through command :npm install cypress --save-dev getting error as The Cypress App could not be downloaded.
Error :
Finishing Installation
The Cypress App could not be downloaded.
Does your workplace require a proxy to be used to access the Internet? If so, you must configure the HTTP_PROXY environment variable before downloading Cypress. Read more: https://on.cypress.io/proxy-configuration
Otherwise, please check network connectivity and try again:
But please not I m not using any proxy and on my personal wifi.
plz suggest ,what can be done in this case.Thanks

It seems to be too many possible reasons for this issue in general but I managed to find a workaround to install Cypress from within a corporation with npm and without using sudo npm or turning off strict ssl.
The following worked for me per November 18th 2020 with Ubuntu 18.04 and npm 6.14.8:
I downloaded the zip file shown in https://docs.cypress.io/guides/getting-started/installing-cypress.html#Direct-download
I installed cypress as shown in https://docs.cypress.io/guides/getting-started/installing-cypress.html#Install-binary : CYPRESS_INSTALL_BINARY=~/Downloads/cypress.zip npm install cypress --save-dev
I could now run npx cypress open to start the gui (which will also generate the cypress.json file)

Possible Reasons for this issue:
U might be running the project with a proxy setting.
One of the reason could be you are behind the firewall.that may prohibit your network? Please follow the guidelines in Proxy Configuration if so(https://docs.cypress.io/guides/references/proxy-configuration.html#Set-a-proxy-on-Linux-or-macOS).
make sure you have right access to install the cypress.
if none of the above mentioned reasons try removing the biraries or node_modules and install again.

Related

Need help installing the VUE plug in for TestCafe

I am new to the product and have minimal coding knowledge. I need to install the testcafe-vue-selectors plugin but the instructions on the github page are lacking detail. The say Install "$ npm install testcafe-vue-selectors" Where do I run this command?
Thanks and sorry for my lack of knowledge.
I assume that you have already installed TestCafe by running a single command in your terminal (command-prompt):
npm install -g testcafe
To install the plug-in, you need to execute a similar command in your terminal (in your project folder):
npm install testcafe-vue-selectors
No additional steps are required. Just ensure that Node.js and npm are installed on your computer.

NPM install Error: self signed certificate in certificate chain

At my company, there is an auto signed ssl certificate. So they're some npm packages that cannot be installed because of it.
I already add strict-ssl=false in .npmrc or --strict-ssl=false command args.
It works for some packages but some doesn't seems to take in charge this option.
For exemple, I tried to install Cypress :
Command :
npm i cypress --save-dev --strict-ssl=false
Error logs :
> cypress#3.4.0 postinstall /Users/mchoraine/Documents/Workplace/SAMSE/rechercheproduit/rechercheproduit-front/node_modules/cypress
> node index.js --exec install
Installing Cypress (version: 3.4.0)
✖ Downloading Cypress
→ Cypress Version: 3.4.0
Unzipping Cypress
Finishing Installation
The Cypress App could not be downloaded.
Please check network connectivity and try again:
----------
URL: https://download.cypress.io/desktop/3.4.0?platform=darwin&arch=x64
Error: self signed certificate in certificate chain
----------
Platform: darwin (18.6.0)
Cypress Version: 3.4.0
Problem seems to occur only for packages with postinstall
The smartest things would be to change the SSL certificate but unfortunately it can't be done.
So are you aware of an alternative to bypass certificat verification on npm postinstall ?
Thanks in advance for your proposal.
Get a copy of your company's certificate, then set the NODE_EXTRA_CA_CERTS environmental variable to point to it before you run the npm commnand:
export NODE_EXTRA_CA_CERTS=path/to/certificate.crt
The post-install script is a separate node program, so the npm flag doesn't affect it.
Credit goes to "zerdos" who posted this solution on a related GitHub issue: https://github.com/cypress-io/cypress/issues/1401#issuecomment-393591520
For me the following solution worked.
OS - windows 10
Terminal - git bash
Run these commands before installing cypress.
setx HTTP_PROXY <your company proxy url>
setx NODE_EXTRA_CA_CERTS <path to cerm.pem file>
These will be set as environment variables in your system for any future use.
You can always get rid of them anytime if you do not need them.

"Node Commands" printed at prompt when trying to run grunt/ gulp on Windows 7

I've installed nodejs, and have used npm to install grunt using
npm install grunt
When I try to run grunt, I am presented with what appears to be instructions on running node commands: (see image)
the same applies when trying to run gulp
I have done the same steps on other computers, and had no problem running grunt previously
Please suggest ideas as to what's going on.
Thanks
As suggested by Joe Clay, the problem was that there was another app called node.exe whose pathwas in PATH variable before nodejs.
see also:
Nodejs seems to be not working; npm do work, however

Apache Cordova VS Community 2015 - Run Dependency Checker Fails

Apache Cordova Dependency Checker fails in VS Community 2015. It was previously working on this computer until I ran several VS and 3rd party tools updates. Here's what I've done to try to resolve the issue:
Installed VS / Apache Cordova (no error messages displayed) following article https://taco.visualstudio.com/en-us/docs/install-vs-tools-apache-cordova/
Run Apache Cordova Dependency Checker but VS freezes with the error message - VS 2015 has stopped working, windows will try to restart the program.
I restarted VS and cleared Cordova cache, checked environment variables (all good), then tried Apache Cordova Dependency Checker with the same freeze result.
I tried to update Apache Cordova with the fix option (no error messages) but received the same freeze results.
I completely uninstalled Apache Cordova, 3rd party tools (following article https://support.microsoft.com/en-us/kb/3016536), and VS community and then reinstalled them (no error messages) but received the same freeze results.
I installed Apache Cordova on another computer and the dependency checker phonegap app... worked. Unfortunately that's not a computer that I have access to.
What else can I do to resolve the Apache Cordova installation issue?
Thanks for any help,
Mike
Since my original post, I've had to resolve Visual Studio, Ionic, Cordova, Phonegap, plugin... environment issue several times. I've found the below works best:
Ensure platform matches plugin requirements, see platform in config.xml e.g. 6.1.1
Uninstall, reinstall latest jdk (adobe)
Clear MEF Cache - download the tool and follow instructions
Download/install latest node.js
Run the following from the command line:
Clear cache: Npm cache clean
Install latest npm: npm install -g npm
Uninstall cordova: Npm uninstall -g cordova
Reinstall cordova: Npm install –g cordova (note, this took 5+ tries to complete without errors. No other changes were made between runs. Not sure
why. Found others complaining about the same issue.)
Remove Android platform: Cordova platform remove android
Install Cordova platform add android#6.X.X (Note, as of 4/20/17 cordova and android compatibility issue. Build error - unable to find installed version of gradle. resolved by running (npm install -g cordova#6.4.0) and (cordova platform add android#6.1.2). Addt'l build errors, resolved by updating components in Android SDK Manager)
Uninstall/Reinstall plugins from the command line. For example:
cordova plugin remove phonegap-plugin-push
cordova plugin add phonegap-plugin-push variable SENDER_ID="YourID#"
npm install bower -g
Restart Visual Studio - Verify plugins were installed via config.xml
Install Ionic:
npm uninstall -g ionic
npm install -g ionic (note: to install specific version, npm install -g ionic#2.2.3)
$ ionic platform add ios
$ ionic platform add android (note: redundant, already added above)
I recommend putting as much of this as possible in a batch file with a pause between commands. Verify each command was successful, if not press ctrl+break at the pause to term the batch file early. The batch file is an easy way to restore your environment when everything breaks again. Stuff happens!
I also started using a VM (oracle virtualbox) for my development environment. That way I can backup my environment before making changes and easily restore. Don't forget to upload to GIT on a daily basis. GIT and VMs are my lifesavers.
Cool NPM commands:
npm list (lists all installed packages)
npm prune (removes packages not depended on by your project according to your package.json)
npm outdated (tells you which installed packages are outdated with respect to what is current in the npm registry but allowable by the version definition in your package.json. Make sure all up-to-date)
Please feel free to add/make suggestions to the above list.
-Mike

Cannot install some packages from npm

My computer has a strange problem. Whenever I try to install some npm packages like ionic and cordova, it fails giving some shasum check failed error.
Like this cmd snapshot:
This has happened with other packages like generator-ionic
I've also checked for proxy setups in Internet Options and Router Settings, there are none.
Also, when I try to install these packages using my phone's data connection (usb tethering) they get installed without any problems.
I am assuming there is some problem with my internet connection, but can't seem to figure out what it is.
If your network is blocking the npm repository ,You may get this error ,Please use fiddler to debug you npm is able to connect to repository