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
Related
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
I have the following folder structure with the locally installed Cypress module:
cypress-test-project
node_modules
cypress
tests.spec.js
As I read it in this article, npx helps to execute globally and locally installed packages:
Run a locally installed package easily
If you wish to execute a locally installed package, all you need to do
is type:
$ npx your-package
npx will check whether or
exists in $PATH, or in the local project binaries, and if
so it will execute it.
As I have Cypress installed in the node_modules folder, I tried to run the following command:
npx cypress open
This is what I get:
No version of Cypress is installed in:
C:\Users\main\AppData\Local\Cypress\Cache\9.5.1\Cypress
Please reinstall Cypress by running: cypress install
Cypress executable not found at:
C:\Users\main\AppData\Local\Cypress\Cache\9.5.1\Cypress\Cypress.exe
Platform: win32-x64 (10.0.22000) Cypress Version: 9.5.1
Why does npx stop after checking the PATH variable and not looking in the local folder?
Cypress always installs to that user-specific (global) location even if you install locally in the project.
It sounds like the install crashed part way.
Try removing and repeating.
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.
Has anyone made eslint work with create-react-native-app in vscode on Windows 10? It is so unstable it's making my skin itch!
Latest npm doesn't work with create-react-native-app so I installed yarn. Now I can create an app. But I have to do this with cmd prompt outside of vscode otherwise I get no QR code to launch app on my phone.
I tried to install eslint locally with yarn, and use airbnb linting rules - this fails - if I install it with npm it works and I can initialise it with airbnb rules. Yay! I now have linting in my project.....but wait! Now I cannot start my project anymore because:
react-native-scripts start
'react-native-scripts' is not recognized as an internal or external command,
operable program or batch file.
This is killing me!! It's taken about 8 hours of $%^#ing around and I haven't even got to try any react native coding yet! Is it supposed to be this insane just to set up the environment?!!?
Anyone have any suggestions? I googled and looked at github issues but I see no solutions for this.
Thanks in advance!
Version 1.5.2 of create-react-app has options for using npm instead of Yarn as well as using a specific npm version. Use create-react-app -h to view help.
Have you also tried adding the following to your VS Code settings when using Yarn?
"eslint.packageManager": "yarn"
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.