Cypress: When I try to run npx cypress open the window opens and then closes immediately - automation

I'm trying to learn cypress, but I haven't been able to get past installation. I follow the documentation, I run npm init and then npm install cypress --save-dev.
Next I tried running npx cypress open and adding to the package.json "cypress:open" : "cypress open and then running npm run cypress:open. In both cases, the launchpad opens for a few seconds and then closes immediately. I understand that it should create a cypress folder in my directory but it doesn't do anything, just closes. There is no error message or anything similar.
I don't know what to do and I can't find any information regarding this error, please help
Console when running commands

I solve it by downgrading Cypress to version 10.0.3

Related

Cypress : npx cypress open command not working

I have downloaded nodejs and installed and set up in the path environment variable.
Downloaded Vscode and then created a project folder(automation).
From the terminal in the folder , provided the command npx init cypress
and then install cypress
wrote a piece of code and then tried executing npx cypress open, but nothing coming up.
Please advise
The issue has been resolved. Such an issue came because of security app of our organizations

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

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.

PhantomJS does not exist Error

I get error PhantomJS does not exist at '/usr/local/phantomjs/bin/phantomjs on the terminal upon running the tests (npm tests) for Cloudboost Javascript SDK repo. Any idea how to fix this?
Install PhantomJS from here, and create a symlink of the downloaded folder in your /usr/local/ directory. Run the command npm test again and that error would be gone.

"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

Can't install Semantic-UI via NPM

I've been trying to install Semantic via NPM for a while now and am having problems. I run npm install semantic-ui and it goes through the setup process. However, it stops at Finished 'install' after 3.61 s and never exits the process. If I manually cancel the process and navigate to the semantic folder and run gulp build I'm told there's no local gulp found. So I run npm install gulp just for fun. It installs and I run gulp build again but all of the gulp dependencies are missing.
Any ideas? It's getting frustrating because I've been tinkering with it for a few hours instead of getting to work on the actual project. Running npm install in the semantic directory or my project directory doesn't work either. Thanks for the help!
EDIT: I tried creating a new Ubuntu VM and installing Semantic the same way I was on my Mac. It worked with no problems leading me to believe it's something to do with my configuration on my Mac.
This is really odd, but after I got to the Finished 'install' step, nothing was happening. Just a solid cursor when the node deps should've been installing. I decided to hit return just to see if anything would happen and that seems to have done it. Hitting return gives me the spinning cursor and the deps install. I can successfully run gulp build after that. Weird.