Cypress doesn't run after upgradinig - cypress

I had Cypress package version: 7.1.0.
I tried to upgrade version: 9.6.1.
Got following error and npx cypress open is giving error.
Need suggestion please.
PS C:\Users\MushfiquaZaman\OneDrive - BAFS\Documents\CypressTesting\Project1> npm install cypress#9.6.1
cypress#9.6.1 postinstall C:\Users\MushfiquaZaman\OneDrive - BAFS\Documents\CypressTesting\Project1\node_modules\cypress
node index.js --exec install
Installing Cypress (version: 9.6.1)
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.cypre
ss.io/proxy-configuration
Otherwise, please check network connectivity and try again:
URL: https://download.cypress.io/desktop/9.6.1?platform=win32&arch=x64
Error: unable to get local issuer certificate
Platform: win32-x64 (10.0.19043)
Cypress Version: 9.6.1
npm WARN Project1#1.0.0 No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! cypress#9.6.1 postinstall: node index.js --exec install
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the cypress#9.6.1 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\MushfiquaZaman\AppData\Roaming\npm-cache_logs\2022-05-13T19_11_23_404Z-debug.log
PS C:\Users\MushfiquaZaman\OneDrive - BAFS\Documents\CypressTesting\Project1>
Session contents restored from 5/13/2022 at 2:11:34 PM
Copyright (C) Microsoft Corporation. All rights reserved.
Try the new cross-platform PowerShell https://aka.ms/pscore6
Loading personal and system profiles took 1859ms.
PS C:\Users\MushfiquaZaman\OneDrive - BAFS\Documents\CypressTesting\Project1> npx cypress open
internal/modules/cjs/loader.js:883
throw err;
^
Error: Cannot find module 'C:\Users\MushfiquaZaman\OneDrive - BAFS\Documents\CypressTesting\Project1\node_modules\cypress\bin\cypress'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
at Function.Module._load (internal/modules/cjs/loader.js:725:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}

Please notice that log includes: "The Cypress App could not be downloaded.". Please download Cypress archive without using npm, unpack archive to cache ( C:\Users\your_username\AppData\Local\Cypress\Cache\9.6.1 ) then install it as previously: npm install cypress#9.6.1 .

It's because you are installing into a "OneDrive" location which is a remote location to where your cache resides (hence the complaint about a workplace proxy).
Try installing to a local path and copying the project up to OneDrive, which I presume is what you did for v7.1.0.

Related

Errors on "npm run dev" (after Laravel clean install)

I'm very excited to learn Laravel and create a webapp based on a bootstrap template I bought (OneUI). I successfully installed Laravel (the /public route returns the default view to my browser correctly). Now i'm following the install guide of the template, and i'm experiencing problems with npm commands that return errors that I can't understand (I'm not familiar with npm).
I'd really appreciate if somebody could help me to find what's wrong so I could finally using Laravel with the Templates.
As requested in the OneUI documentation, i copy the public & resources folders, the routes/web.php file, and the webpack.mix.js file. Then, i install the npm dependencies running the following command :
npm i browser-sync browser-sync-webpack-plugin sass sass-loader bootstrap#^4.5.3 jquery#^3.5.1 jquery-scroll-lock#^3.1.3 jquery.appear#^1.0.1 js-cookie#^2.2.1 popper.js#^1.16.1 simplebar#^5.3.0 -D
This seems to run OK with a few warnings about some deprecated packages.
Then i run :
npm run dev
I get this return :
> # dev /volume1/web/dev/myproject
> npm run development
> # development /volume1/web/dev/myproject
> mix
events.js:287
throw er; // Unhandled 'error' event
^
Error: spawn npx ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19)
at onErrorNT (internal/child_process.js:469:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
Emitted 'error' event on ChildProcess instance at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:273:12)
at onErrorNT (internal/child_process.js:469:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21) {
errno: 'ENOENT',
code: 'ENOENT',
syscall: 'spawn npx',
path: 'npx',
spawnargs: [
'webpack',
'--progress',
'--config=node_modules/laravel-mix/setup/webpack.config.js'
]
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! # development: `mix`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the # development script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /var/services/homes/admin/.npm/_logs/2021-01-25T22_32_54_150Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! # dev: `npm run development`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the # dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /var/services/homes/admin/.npm/_logs/2021-01-25T22_32_54_340Z-debug.log
This is on Linux, directly on my Synology (I don't use anything like a VM/Docker).
To install Laravel, I simply did this :
Installed php7.4 + libraries
Installed composer
Went into my web folder and entered the command : composer create-project laravel/laravel myproject
Added write access to my http user on the storage folder
I tryied this already without success :
As advised on other websites:
rm -rf node_modules
rm package-lock.json yarn.lock
npm cache clear --force
npm install
npm run dev
I tryied to do a npm install and npm run dev on a clean Laravel Install (before the install of all the packages required by the OneUI templates) to try to see if it's related to the OneUI files or the npm dependencies I installed. I have the same errors. So I understand it's not related to the OneUI install, but an issue with npm / my Laravel files (?).
In advance, thanks a lot for your help !

Error when running npm start: nvm is not compatible with the "npm_config_prefix" environment variable

I am working on a project which I use nvm.
Out of nowhere, I started to get this error when running "npm start":
npm start
> sh ./bin/start.sh
nvm is not compatible with the "npm_config_prefix" environment variable: currently set to "/Users/user/.nvm/versions/node/v8.9.4"
Run `unset npm_config_prefix` to unset it.
Found '/Users/user/project/project/.nvmrc' with version <8.9.0>
nvm is not compatible with the "npm_config_prefix" environment variable: currently set to "/Users/user/.nvm/versions/node/v8.9.4"
Run `unset npm_config_prefix` to unset it.
/Users/user/project/project/node_modules/node-sass/lib/binding.js:15
throw new Error(errors.missingBinary());
^
Error: Missing binding /Users/user/project/project/node_modules/node-sass/vendor/darwin-x64-59/binding.node
Node Sass could not find a binding for your current environment: OS X 64-bit with Node.js 9.x
Found bindings for the following environments:
- OS X 64-bit with Node.js 8.x
This usually happens because your environment has changed since running `npm install`.
Run `npm rebuild node-sass --force` to build the binding for your current environment.
at module.exports (/Users/user/project/project/node_modules/node-sass/lib/binding.js:15:13)
at Object.<anonymous> (/Users/user/project/project/node_modules/node-sass/lib/index.js:14:35)
at Module._compile (module.js:649:30)
at Object.Module._extensions..js (module.js:660:10)
at Module.load (module.js:561:32)
at tryModuleLoad (module.js:501:12)
at Function.Module._load (module.js:493:3)
at Module.require (module.js:593:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/Users/user/project/project/node_modules/node-sass/bin/node-sass:10:10)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! #namespace/project#5.14.1 start: `sh ./bin/start.sh`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the #namespace/project#5.14.1 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/user/.npm/_logs/2018-06-19T19_30_15_079Z-debug.log
I have already tried the following actions with no success:
1) Delete the repo, clone it again and run npm install
2) Update npm
3) Delete nvm folder and download it again
4) Run unset npm_config_prefix
5) Run npm rebuild node-sass --force
Obs.: I use zsh terminal on a Mac OS 10.13.4
I ran nvm deactivate as suggested here and the error went away.
I only ran that command and none of the other ones.
If using nvm and not system node
Obviously one can add line
unset NPM_CONFIG_PREFIX
into a batch file. Or run it in terminal

Composer runtime (0.18.2) is not compatible with client (0.17.6)

I am trying to run composer-sample-applicaions(Digital Property) but when I am trying to run npm test it is throwing an error: Composer runtime (0.18.2) is not compatible with the client (0.17.6)
Following is the complete log:
paradox#labrats:~/hyperledger/composer/github/composer-sample-applications/packages/digitalproperty-app$ npm test
> digitalproperty-app#0.0.7 test /home/paradox/hyperledger/composer/github/composer-sample-applications/packages/digitalproperty-app
> npm run bootstrapAssets && npm run listAssets && npm run submitTransaction
> digitalproperty-app#0.0.7 bootstrapAssets /home/paradox/hyperledger/composer/github/composer-sample-applications/packages/digitalproperty-app
> node cli.js landregistry bootstrap
info: [DigitalProperty-App] Hyperledger Composer: Digital Property console application
info: [DigitalProperty-App] Adding default land titles to the asset registry
error: [DigitalProperty-App] Error: Error trying to ping. Error: Composer runtime (0.18.2) is not compatible with client (0.17.6)
Command failed.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! digitalproperty-app#0.0.7 bootstrapAssets: `node cli.js landregistry bootstrap`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the digitalproperty-app#0.0.7 bootstrapAssets script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/paradox/.npm/_logs/2018-03-26T09_35_58_193Z-debug.log
npm ERR! Test failed. See above for more details.
paradox#labrats:~/hyperledger/composer/github/composer-sample-applications/packages/digitalproperty-app$
Any lead would be appreciated
The runtime refers to the version of Composer that is installed on to the Peer with your Network - you can see this if you execute docker ps -a and you will see a container with a name such as dev-peer0.org1.example.com-animaltracking-network-0.16.6... this shows the Composer runtime version and the network name.
You have a couple of options:
Re-create your Fabric which will delete that container with the 18.2 runtime
Upgrade your client to 18.2
Different versions of Composer need different versions of Fabric - checkout this document which covers releases of Composer with their supported Fabric versions.
Composer runtime and client must be on same version.
Best approach to solve this issue, execute following commands in order.
npm install -g composer-cli
npm install -g composer-rest-server

Vulcan.js with git bash on windows using powershell

I am using bash on Ubuntu on windows, I open powershell and the run command bash I navigate to the Vulcan-starter repo I cloned. It is a Meteor project. I have installed meteor using the curl command as recommended on Meteor's website. I am using node version 8.11.1 I run npm install and everything installs fine, when I run npm start this is where I get the errors. Here is the error below, and a more detailed log is included in this gist.
MongoDB had an unspecified uncaught exception.
This can be caused by MongoDB being unable to write to a local database.
Check that you have permissions to write to .meteor/local. MongoDB does
not support filesystems like NFS that do not allow file locking.
npm ERR! code ELIFECYCLE
npm ERR! errno 254
npm ERR! Vulcan#1.8.11 start: `meteor --settings settings.json`
npm ERR! Exit status 254
npm ERR!
npm ERR! Failed at the Vulcan#1.8.11 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/anderskitson/.npm/_logs/2018-03-30T21_21_54_469Z-debug.log

Any suggestions how to install grunt in windows behind a proxy?

I'm trying to install grunt on a windows machine that is behind a corporate proxy.
I have installed node and npm, I can see the versions of both of them from the command line. But when I try to install grunt as is described in the grunt site http://gruntjs.com/getting-started but I get the following errors and I can't figure it out how to solve it.
Here is the Error message I get:
npm.cmd: npm ERR! Error: CERT_UNTRUSTED
At line:1 char:4 + npm <<<< install -g grunt-cli + CategoryInfo : NotSpecified:
(npm ERR! Error: CERT_UNTRUSTED:String) [], RemoteException + FullyQualifiedErrorId:
NativeCommandError
npm ERR! at SecurePair.<anonymous> (tls.js:1367:32), npm ERR! at SecurePair.emit (events.js:92:17), npm ERR! at SecurePair.maybeInitFinished (tls.js:979:10), npm ERR! at CleartextStream.read [as _read] (tls.js:471:13), npm ERR! at CleartextStream.Readable.read (_stream_readable.js:340:10), npm ERR! at EncryptedStream.write [as _write] (tls.js:368:25)
npm ERR! at doWrite (_stream_writable.js:225:10), npm ERR! at writeOrBuffer (_stream_writable.js:215:5), npm ERR! at EncryptedStream.Writable.write (_stream_writable.js:182:11), npm ERR! at at write (_stream_readable.js:601:24), 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/npm/npm/issues>, npm ERR! System Windows_NT 6.1.7601, npm ERR! command "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "grunt-cli"
npm ERR!cwd C:\Dev\gruntTest2, npm ERR! node -v v0.10.31, npm ERR! npm -v 1.4.23
I am using visual studio 2013. I have tried installing direct from the command line and from the Package Manager Console, and basically I get the same error.
Any suggestions how to solve this?
Thanks in advance.
In order to be able to install grunt or anything else from npm, first I need to use the following command:
npm config set strict-ssl false
I found this answer in different places around stackoverflow and other sites. But I used as a reference Ramesh answer. I also include the proxy address of the network, but that didn't work until I change strict-ssl configuration.
You could run a proxy on your own system ( fiddler can function as a proxy)
and point your browser proxy settings to this proxy.
Because fiddler is started under your credentials, proxy authentication is no longer a problem.
Remember to restart programs after you change the proxy settings

Resources