How do I get Cypress to detect my existing Chrome browser after upgrade? - windows

After upgrading from Cypress 3.2.0 to 3.3.0, Cypress opens with only the Electron option for execution.
I've tried completely uninstalling Cypress (both versions), and re-installing from scratch with npm.
When trying to do this:
https://docs.cypress.io/guides/guides/debugging.html#Clear-App-Data
I get this:
{ Error: spawn cmd ENOENT
at _errnoException (util.js:1024:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:190:19)
at onErrorNT (internal/child_process.js:372:16)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
code: 'ENOENT',
errno: 'ENOENT',
syscall: 'spawn cmd',
path: 'cmd',
spawnargs:
[ '/c',
'start',
'""',
'/wait',
'C:\\Users\\James\\AppData\\Roaming\\Cypress\\cy\\production' ] }
Error: spawn cmd ENOENT
at _errnoException (util.js:1024:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:190:19)
at onErrorNT (internal/child_process.js:372:16)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
I expect that Cypress when upgrading, wouldn't lose the location of the existing Chrome installation and that I would be able to debug the issue by clearing the app data without error.

Related

cypress +10-cucumber error while report with cucumber-preprocessor on M1 mac

I am trying to migrate cypress to 10+, but I am getting an error while creating the cucumber report as below on M1 mac, could anyone please help me with it.
An error was thrown in your plugins file while executing the handler for the after:run event.
The error we received was:
Error: spawn cucumber-json-formatter ENOENT
at Process.ChildProcess._handle.onexit (node:internal/child_process:283:19)
at onErrorNT (node:internal/child_process:478:16)
at processTicksAndRejections (node:internal/process/task_queues:83:21)

Running yarn start on Windows 10 keeps failing

I am moving a web project from my Mac to a Windows 10 PC. I used Github Desktop to download all of files and I'm using Visual Studio Code to work on my project. Everytime I run both npm start or yarn start I get this error. I have tried deleting yarn.lock,package-lock.json, node_modules, using other script terminals, clearing my cache, npm install npm rebuild, yarn install. Everything I could find didn't work and I have no clue what to do. Any help would be appreciated. Thanks!
Here is the error message:
Starting the development server...
events.js:200
throw er; // Unhandled 'error' event
^
Error: spawn cmd ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19)
at onErrorNT (internal/child_process.js:456:16)
at processTicksAndRejections (internal/process/task_queues.js:81:21)
Emitted 'error' event on ChildProcess instance at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:270:12)
at onErrorNT (internal/child_process.js:456:16)
at processTicksAndRejections (internal/process/task_queues.js:81:21) {
errno: 'ENOENT',
code: 'ENOENT',
syscall: 'spawn cmd',
path: 'cmd',
spawnargs: [ '/s', '/c', 'start', '""', '/b', '"http://localhost:3000/"' ]
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
All right, look carefully at this:
{
errno: 'ENOENT',
code: 'ENOENT',
syscall: 'spawn cmd',
path: 'cmd',
spawnargs: [ '/s', '/c', 'start', '""', '/b', '"http://localhost:3000/"' ]
}
errno: 'ENOENT' means the file or directory is not found
path: 'cmd' denotes the executable cmd was not found locally or globally while spawning process cmd via Node.js
Now, I don't want to go into details. Just know that your operating system needs to keep track of some variables which can be accessed globally. One of such variable is called $PATH. The executables inside directories mentioned in the $PATH can be accessed from anywhere on your system.
Here, 'C:\Windows\system32' is a path where windows keeps some critical executables. cmd.exe is one of them. Somehow the path was deleted from the $PATH variable. In order to fix the problem, an easy solution is:
Go to start-menu -> search and type environment variables and open it
There will be a variable named PATH. Append C:\Windows\system32 to it and press OK. If you're on Windows 7 or below, add a semi-colon ; before it
Restart your terminal or IDE or code editor and try running the app. See if the error comes again

Installation LoopBack-CLI error node-gyp rebuild

Hi Im installing the loopback-cli.
Running these commands:
npm install --global --production windows-build-tools
AND
npm install -g loopback-cli
The second command run rebuilding the ursa module into error. There is some link to C:\OpenSSL-Win64. What the ... is this? Some hardcoded library link?
Write me please some way how to install normally the loopback. This is from their installation site. Thanx.
Here the log:
C:\Users\Erik\AppData\Roaming\npm\node_modules\loopback-cli\node_modules\ursa>if not defined npm_config_node_gyp (node "C:\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
ursaNative.cc
win_delay_load_hook.cc
..\src\ursaNative.cc(157): warning C4244: 'argument': conversion from 'ssize_t' to 'int', possible loss of data [C:\Use
rs\Erik\AppData\Roaming\npm\node_modules\loopback-cli\node_modules\ursa\build\ursaNative.vcxproj]
..\src\ursaNative.cc(172): warning C4244: 'argument': conversion from 'ssize_t' to 'int', possible loss of data [C:\Use
rs\Erik\AppData\Roaming\npm\node_modules\loopback-cli\node_modules\ursa\build\ursaNative.vcxproj]
LINK : fatal error LNK1181: cannot open input file 'C:\OpenSSL-Win64\lib\libeay32.lib' [C:\Users\Erik\AppData\Roaming\n
pm\node_modules\loopback-cli\node_modules\ursa\build\ursaNative.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:258:23)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Windows_NT 10.0.15063
gyp ERR! command "C:\\nodejs\\node.exe" "C:\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Erik\AppData\Roaming\npm\node_modules\loopback-cli\node_modules\ursa
gyp ERR! node -v v8.9.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: ursa#0.9.4 (node_modules\loopback-cli\node_modules\ursa):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: ursa#0.9.4 install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
+ loopback-cli#4.0.0
added 3 packages and updated 1 package in 27.638s
Same issue here.
Setup before fixing:
lb -v 4.2.1 (generator-loopback#5.9.4 loopback-workspace#4.5.0)
node -v v10.13.0
OS: Windows 10 Home
I was able to fix the issue after taking the following steps:
Install node v8.12.0
Install OpenSSL 1.1 in C:\OpenSSL-Win64 (strong-ursa hard codes the location)
Create a symbolic link in C:\OpenSSL-Win64\lib named libeay64.lib which targets libcrypto.lib.
Run npm i -g windows-build-tools
Run npm i -g looback-cli again.
I'm not sure if rolling back the NodeJS version to 8.12 is necessary. There are a few widely, albeit not well documented pain points working with Loopback due to strong-ursa's use of native libraries. (Please note, this is unconfirmed information as I'm in a hurry to get back to developing the project at hand.) These steps allowed me to continue using Loopback CLI unhindered.
Useful links:
Download previous NodeJS releases: https://nodejs.org/en/download/releases/
Download OpenSSL: https://slproweb.com/products/Win32OpenSSL.html
windows-build-tools: https://github.com/felixrieseberg/windows-build-tools
https://github.com/curl/curl/issues/984
https://github.com/strongloop/loopback-cli/issues/36#issuecomment-434331508

npm Windows 7 error

I am helping someone get through running npm in Windows 7. When npm update is executed, the following error (ENOENT, scandir) is returned. But the folder that npm could not find has been verified to exist, and the user running npm has full permissions on the folder. Below are the details of the npm-debug.log for this error:
18265 silly fetchPackageMetaData errno: -4058,
18265 silly fetchPackageMetaData code: 'ENOENT',
18265 silly fetchPackageMetaData syscall: 'scandir',
18265 silly fetchPackageMetaData path: 'C:\\Users\<\userpath\>\\npm-cache\\_git-remotes\\git-github-com-polymerelements-test-fixture-git-8142662e\\HEAD' }
18266 silly rollbackFailedOptional Starting
18267 silly rollbackFailedOptional Finishing
18268 silly runTopLevelLifecycles Finishing
18269 silly install printInstalled
18270 verbose stack Error: ENOENT: no such file or directory, scandir 'C:\Users\\<userpath\>\npm-cache\_git-remotes\git-github-com-polymerelements-test-fixture-git-8142662e\HEAD'
18271 verbose cwd C:\Users\\<userpath\>\git\PredixDev\predix-seed
18272 error Windows_NT 6.1.7601
18273 error argv "G:\\nodejs\\node.exe" "G:\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "update" "--no-optional"
18274 error node v7.2.0
18275 error npm v3.10.9
18276 error path C:\Users\\<userpath\>\npm-cache\_git-remotes\git-github-com-polymerelements-test-fixture-git-8142662e\HEAD
18277 error code ENOENT
18278 error errno -4058
18279 error syscall scandir
18280 error enoent ENOENT: no such file or directory, scandir 'C:\Users\\<userpath\>\npm-cache\_git-remotes\git-github-com-polymerelements-test-fixture-git-8142662e\HEAD'
18281 error enoent ENOENT: no such file or directory, scandir 'C:\Users\\<userpath\>\npm-cache\_git-remotes\git-github-com-polymerelements-test-fixture-git-8142662e\HEAD'
18281 error enoent This is most likely not a problem with npm itself
18281 error enoent and is related to npm not being able to find a file.
18282 verbose exit [ -4058, true ]
I'm not familiar at all with using Node on Windows. Please help, thank you. (NOTE: I've replaced specific user folder information above with \ to sanitize the info.)
One possible cause is security software that filters access to the file system, like DigitalGuardian. If it's a corporate machine with something like that installed, you may need to get your IT people to whitelist Node.
https://github.com/npm/npm/issues/10729

"npm faq" fails on Windows 7 ("spawn ENOENT" errors)

I have installed node.js on Windows 7 with their latest installer. It seemed to work, I can call npm and node from the console (either cmd or PowerShell), but I keep getting errors.
There are a lot of questions here about node.js on windows, but they all mention some specific piece of code. I'm getting the "spawn ENOENT" with a lot of simple commands, for instance yo, if I then pick "update generators" :
events.js:72
throw er; // Unhandled 'error' event
^
Error: spawn ENOENT
at errnoException (child_process.js:988:11)
at Process.ChildProcess._handle.onexit (child_process.js:779:34)
even npm faq fails :
PS E:\www\something> npm faq
npm ERR! Error: spawn ENOENT
npm ERR! at errnoException (child_process.js:988:11)
npm ERR! at Process.ChildProcess._handle.onexit (child_process.js:779:34)
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR! <http://github.com/isaacs/npm/issues>
It seems that the problem is that node uses unix command names like dir, which do not exist on Windows. Some blog posts mention using Cygwin, but mostly for building node.js, not for calling it. The official nodejs website doesn't mention that cygwin is a prerequisite, either.
Here's the npm-debug.log :
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\\\node.exe',
1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'faq' ]
2 info using npm#1.3.24
3 info using node#v0.10.25
4 verbose node symlink C:\Program Files\nodejs\\node.exe
5 error Error: spawn ENOENT
5 error at errnoException (child_process.js:988:11)
5 error at Process.ChildProcess._handle.onexit (child_process.js:779:34)
6 error If you need help, you may report this *entire* log,
6 error including the npm and node versions, at:
6 error <http://github.com/isaacs/npm/issues>
7 error System Windows_NT 6.1.7601
8 error command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "faq"
9 error cwd E:\
10 error node -v v0.10.25
11 error npm -v 1.3.24
12 error syscall spawn
13 error code ENOENT
14 error errno ENOENT
15 verbose exit [ 1, true ]
Make sure that you have c:\Windows\System32 on your 'Path' System Variable. I was having this exact problem and this was the fix I needed. I must have taken it out in error sometime in the past.

Resources