Having trouble launching Cypress on my Mac - stating that it cannot find Cypress

Despite searching through multiple answers on S.O, none of them have solved my issue.

To better explain my question, I've created a video. You can view it here

Everything was working perfectly just yesterday, so what could have possibly gone wrong?

Here are the steps I've taken so far:

I've reinstalled cypress

Attempted to open with : .node_modules\.bin\cypress open

Then tried: npx cypress open

After which, I received the following message

No version of Cypress is installed in: /Users/jacquelinegeorge/Library/Caches/Cypress/3.4.0/Cypress.app

Please reinstall Cypress by running: cypress install

----------

Cypress executable not found at: /Users/my_name/Library/Caches/Cypress/3.4.0/Cypress.app/Contents/MacOS/Cypress

----------

Platform: darwin (18.7.0)
Cypress Version: 3.4.0

Answer №1

After some experimentation, I successfully executed the command on my Mac:

npx cypress open

Answer №2

Executing npx cypress install command resolved the issue for me

Answer №3

After testing your method and making some adjustments, here's what I found: ./node_modules/.bin/cypress open works perfectly for me (please note the forward slashes instead of backslashes).

.node_modules/.bin/cypress open does not work for me as expected (this command was shown in your video but with different slashes). In your stackoverflow question, you included an extra / before node_modules that you didn't mention in the video.

Another option that should work is launching cypress via the OSX Launcher and then selecting the automation directory.

Answer №4

Your approach is accurate and makes sense. Specifically on macOS, the issue may arise if you haven't installed cypress globally or added its path to the system's variable. In such cases, running cypress run may not work as expected, requiring you to specify the location explicitly like this: ./node_modules/.bin/cypress open

Answer №5

Attempt to execute the following command:

npm install 

After that, attempt to run it once more.

Answer №6

To clear the cache in Cypress, you can use the following command:

npx cypress cache clear

Before running this command, make sure you have Cypress installed by running:

npm install cypress --save-dev

After clearing the cache, don't forget to reinstall Cypress with:

npx cypress install 

For more information, check out: clear cypress cache

Answer №7

It might be a bit delayed, but I suggest giving this a shot:

1 -

./node_modules/.bin/cypress install

2 - ./node_modules/.bin/cypress open

This should launch cypress for you.

Answer №8

When working on a Mac, you can run Cypress in your project by executing the following command:

./node_modules/cypress/bin/cypress run --spec path/to/file/address

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Transmit and exchange events between two JavaScript files within a node.js environment

Having some trouble getting EventEmitter to work in both directions between two Javascript files. In my server.js file: let api = require('./api') // Not working api.on("yo", data => { console.log(data) }) // Working api.emit("ready", "S ...

jQuery tabs become non-functional following submission of form

I have a form contained within a jQuery tab div that is loaded using AJAX: <div id="tabs-2"> <form id="frmLogin" name="frmLogin" class="cmxform" method="post" action="actions/login.php"> <p> <label>Username& ...

Creating a pattern for values ranging from 18 to 99, including leading zeros, using regular expressions

Looking for a Regular Expression that matches numbers from 018 to 099, inclusive. The numbers must range between 18 and 99, and include a leading zero for values less than 100. ...

What is the best way to retrieve the content of HTML tags from a string using JavaScript or AngularJS?

I have a string with mixed content of HTML tags and text. Here is an example: var str = "<p></p><p><i>blabla</i></p><p><i><b>blaaaaaablaaaaa</b></i></p><iframe src="..." height=" ...

Having issues with the link page in react-router-dom?

Currently, I am utilizing the react-router-dom library to manage routers. However, I have encountered an issue where linking to another page does not change the page, but instead adds the new page right after the previous one as shown in the image below. W ...

What is the best way to display a template after submitting data via AJAX in the Flask framework?

Encountering an issue where I am unable to open render_template after posting data with ajax. Below is my ajax code: if ($(this).attr("value") == "button-three") { var skoring = getRadioVal(document.getElementById('mentodeNegasi'),'neg ...

What could be causing the browser to only partially display an image?

Have you encountered any issues with the browser not displaying an image fully? It seems like there may be a problem with the image download or rendering process, causing only part of the image to load. My application utilizes node and socket.io. Below ar ...

What is the best way to adjust the size of my Leaflet map within a Bootstrap collapse module in my Dash application?

I am currently working on integrating a bootstrap collapse element that contains a leaflet map. My goal is to toggle the map view open and closed, but I have encountered an issue where the map does not resize properly when the collapse item is opened. As a ...

The browser has surpassed the maximum call stack size while trying to refresh with socket.io, causing an error

I've encountered an issue with my Node js server crashing whenever I refresh the browser. The websocket connection works fine initially, but upon refreshing, the server crashes with the following error: E:\Back\node_modules\socket.io-pa ...

Implementing objects in a three.js scene without displaying them on the screen

I have a function called createCylinder(n, len, rad) that is being invoked from another function named createScene(). Despite checking that the vertices and faces are correctly added without errors, the geometry itself is not rendering. I suspect this is ...

Determining when all $http requests have completed in AngularJS

After running multiple $http calls, I need to trigger an event only when all of them have been processed. Additionally, I must be informed if any call has failed along the way. Despite attempting solutions found on stackoverflow, such as using an intercept ...

How should I address the gulp 4.0.2 dependency vulnerabilities?

There is a vulnerability found in my project's dependencies listed in the package.json. Specifically, gulp has been flagged for moderate security vulnerabilities. { "name": "myproject", "devDependencies&quo ...

Is it possible to conceal and completely empty the TextBox once the checkbox is deselected?

When the checkbox is checked, the textbox is displayed; otherwise, it remains hidden. However, the value is not being cleared. Can someone please help me with this issue? Thank you in advance. HTML <div class="munna"> <in ...

Incorporate a click function onto the image within the canvas

After creating a canvas and placing an image on it, I realized that I need to include a click event for that image. Below is the code snippet I have written in attempt to achieve this. <canvas id="myCanvas" width="578" height="1000"></canvas> ...

Changing the custom route in React Router to utilize a render prop instead of the component prop

I'm currently working on a React app that incorporates React Router. I've been encountering a bug in my code stemming from my custom ProtectedRoute component: const ProtectedRoute = ({ component, ...args }) => ( <Route component={with ...

What causes the jQuery mouseenter events to be activated in a random sequence?

I currently have a setup of 3 nested divs, resembling the concept of a Matryoshka doll. Each div has a mouseenter event function bound to it. When moving the mouse slowly from the bottom and entering layer three, the events occur in the following sequence ...

Tips for sending a form and showing results without the need to refresh the page

I am currently working on developing a basic calculator that takes a user input number and displays the calculated output without redirecting or reloading the page. However, since I have no experience with JavaScript (js) and Ajax, I am seeking assistance ...

Using jQuery to include a sub-object in the "data" object for each AJAX request made on the webpage

Is there a way to enhance the functionality of jQuery.ajax by including a static sub-data object in every ajax request automatically? For instance, for an ajax request like this: jQuery.ajax({ url: 'request_file.php', data: { da ...

What is the best way to generate bootstrap rows from this code in React JS?

In my current array of objects, I have twelve items: { data:[ { type:"tweets", id:"1", attributes:{ user_name:"AKyleAlex", tweet:"<a href="https://twitter.com/Javi" target="_blank"> ...

Why do I keep getting undefined when I use React.useContext()?

I'm currently using Next.js and React, employing react hooks along with context to manage state within my application. Unfortunately, I've encountered a perplexing issue where React.useContext() is returning undefined even though I am certain tha ...