Install Cypress in a Production Application

InstructorBrett Cassette

Share this video with your friends

Send Tweet

So you have a production application, and it doesn't use Cypress yet.

In this course, you'll learn how to add Cypress to your existing npm application, and run it for the first time.

Recommended Homework:

  • Look through the tests Cypress spins up for you and learn how typical Cypress tests are setup
Shripada Hebbar
~ 5 years ago

I get this error when I run: (npm bin)/cypress open parse error near `/cypress'

I use zsh.

Dan
~ 5 years ago

Yep, same :/

Dan
~ 5 years ago

After reading several stackoverflow posts and messing around with my .zshrc file for a while, just running npx cypress open has the same result

Brett Cassetteinstructor
~ 5 years ago

Hey guys, thanks for checking out the course and sorry for the confusion! The updated transcripts will be live soon, but there's a typo there. $ $(npm bin)/cypress open (notice the extra dollar sign) will perform shell expansion. You can see this if you run echo $(npm bin), which will evaluate and show you your npm bin path. npx cypress open is another good solution!

web-learning_5
~ 5 years ago

When encountering the following problem when running frontend e.g. on a windows machine:

'PORT' is not recognized as an internal or external command,
operable program or batch file.

Use cross-env as suggested here

"frontend": "cross-env PORT=5000 REACT_APP_API_URL=http://localhost:3000 react-scripts start",
shwetakamaraddi
~ 4 years ago

Is this working? lot of errors when I tried the steps listed and eventually cypress failed to run

Lucas Minter
~ 4 years ago

@shwetakamaraddi

What I did to get rid of the errors I was running into, I did:

npm r -g watchman 
brew install watchman