Cypress doesn't create directory on install - installation

I did have Cypress working at one point with 4.12.1, then upgraded to 5.0 and updated a couple of npm packages identified by npm-check-update. Now it refuses to start at all, it just hangs with Starting:Cypress displayed.
I tried my best to uninstall and remove all trace of cypress, even deleting the cache directory before installing the new version (either 4.12.1 or 5.0).
But every time I install it, even in a new project directory, it no longer creates the cypress directory. I think if I can find out why that isn't happening it will somehow be related to the original problem.
When I try to start with 'npx run cypress', I get the following:
Starting: cypress
internal/modules/cjs/loader.js:800
throw err;
^
Error: Cannot find module 'D:\inSight_HEAD\Web\Frontend\Apps\Test\cypress'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:797:15)
at Function.Module._load (internal/modules/cjs/loader.js:690:27)
at Function.Module.runMain (internal/modules/cjs/loader.js:1047:10)
at internal/main/run_main_module.js:17:11 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
I even went so far as to revert my (Windows 10) machine back to a system save point from yesterday when it was working, having to reinstall my web browsers afterward, but it didn't help.
Thanks for any ideas on how to proceed. I've only been using cypress for a couple of days, had written a few successful tests, but now it's come to a screeching halt and I've spent an entire day just trying to get it to run at all.

Thanks Alapan, that was it. Somehow I got confused and kept trying to run 'npx run cypress' (which either doesn't create the directories, or if the directories do exist it hangs forever on Starting: cypress), when I should have been running 'npx cypress open' or 'npx cypress run'.

Related

How to fix npm Error "timed out" after npm update

We have a React app, based on the Hydrogen theme for Shopify (which uses vite). It was all working ok until I had to add a package and update. It then started giving the following message: Error timed out. That is it, no other error message, I looked in the logs and there was nothing remarkable in there.
I tried removing the package, and all references to it in the code. But it looks like the issue may well have been the update command. But being rather new to React and npm on Windows, I have no idea how to fix it. Things that I did try were clearing the cache using:
npm cache clean --force
Doing another update. Removing the lock file.
Does anyone have a suggestion as to a method to debug that one-line error code, or could point me in the right direction? I am running on localhost, via Windows 10.
npm error timed out image
My problem must have been a broken dependency. After a day or so of trying updates, it eventually just started working again. The update that actually worked had some vulnerabilities, so I ran an:
npm audit fix
After the npm audit fix, the code started running correctly again.

How to deploy an Expo/React Native app to iOS Device from Xcode

I'm somewhat new to react native and expo but I've been trying to deploy a test version to my phone but can't figure out how to get it to build.
For some extra context, I built most of it in Expo and then ejected it (yes I know this isn't the best choice but I liked the features Expo provided). I ejected it because I needed NFC support which isn't currently supported in Expo so I added that in manually in Xcode after I ejected.
When I open the Xcode workspace and try to deploy it to my phone I get the following error:
Error: Failed to connect to the packager server. If you did not start this build by running 'react-native run-android', you can start the packager manually by running 'react-native start' in the project directory. (Error: Request to packager server failed: 500)
    at /Users/user/Downloads/honorProj-reactNatveFinal/honorProj/reactNative/ethelontisApp/node_modules/expo-updates/scripts/createManifest.js:40:11
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
Command PhaseScriptExecution failed with a nonzero exit code
I know it says run react-native start in the project directory (although I'm not entirely what the at /Users/... is refering too) but what really threw me was that it mentioned react-native run-android which doesn't seem like it should be related at all.
Lastly I'm completely and utterly lost with what Command PhaseScriptExecution is.
Thanks for the help.
I was facing the exact same issue. So I just completed the set up the android development first.
But before doing anything, follow the below steps, it may solves the problem.
Step-1: Open terminal and navigate to your project directory example: cd Your project path.
Step-2: Type npx react-native start
Step-3: If you get any error like "error listen EADDRINUSE: address already in use :::8081"
Then follow step-4 to 6:
Step-4 : type sudo lsof -n -i4TCP:8081 // You will get PID from here
Step-5: type kill -9 PIDvalue
Step-6: Repeat the step 2 and 3 once again
If you will not get any error in step- 2 then type npx react-native run-android
and check if there is any error. If yes, then you have to set up the android development first to make it working - (As of now I found this way, but not sure if anyone can find any better way).
Else Open the code using xcode then clean the build and also clean the build folder then try to run.
Thanks, Hope it will help.

Cypress web automation - Cannot open Test Runner

I'm trying to open the Test Runner in cypress first time using the command node_modules.bin\cypress open
But I'm getting the following error.
Cypress verification timed out
Command failed "path"\cypress.exe\smoke test ping=948
I had tried all other open commands as well.
Could you help me with this?
I know this question was long ago, but I just had this problem, and in case anyone does in the future, I want to tell you how I solved it. In my case I had just installed Cypress in a project, and after running npm install the problem has been solved.

React native app stopped to work after git pull command

I've an app developed using React Native, everything was ok at the begin, but at certain moment the app started to raise this error on iOS:
something went wrong initializing native ReactNativeLocalization
Now, the only thing that i've did is to delete the project, re-get it from git, execute npm install, react-native link, pod update, pod install, and build again(using the .xcworkspace file).
If I install manually ReactNativeLocalization a different error will raise:
undefined is not an object (evaluating 'RNGestureHandlerModule.State')
If I install also react-native-gesture-handler the will crash at the immediately at the startup
I've tried to pull very old version, but everyone of it do the same errors...
There is so much code, I don't know which code could be useful in this case.
I expect that, after re-pull a working version, the app have no errors.

Running Expresso TDD in Node.js on Windows

Has anyone been able to get this to work?
Environment:
Windows 7 64-bit
node.js v0.6.7
npm 1.1.0-beta-10
expresso 0.9.2
I've successfully installed via npm from zip download (after modifying package.json to remove node-jscoverage dependence). 'npm ls' lists expresso as installed. After overcoming the problem described here by commenting out the reference to SIGINT, expresso will execute from cmd window. However, when I actually attempt to run test suites, I get a 'Cannot find module' error when it tries to open the first test suite. Any help would be appreciated.
You'll have to install the module locally, too.
Have you considered using mocha? It's supposed to be expresso's successor, written by the same author.

Resources