Closed matifniaz closed 1 year ago
I too have this same problem. When I comment out the two commands matifniaz mentions, the error goes away and cypress will run tests as long as they do not reference one of the cypress-mongodb commands.
Thanks for raising the issue, will take a look over the weekend.
If you think of any way to get around it in the mean time, please share. I cant use Cypress without turning off a lot of tests and cypress-mongodb
I found a workaround by renaming the node_modules/@aws-sdk folder. After that I could run tests
I found another temporary workaround by removing all references to @aws-sdk from package-lock.json and running npm install again.
I'm having the same issue. In my case, I'm using typescript with cypress 10.11.0
For anyone else running into this, in latest mongodb release 4.11.0 they made aws-sdk dependencies optional.
To fix this error you can update to latest mongodb version and re-install dependencies with yarn install --ignore-optional
. You may need to delete node_modules
and yarn.lock
for this to work.
Hi, I'm having the same problem.
As @wilson208 wrote, it is the mongodb dependency which causes the issue. I downgraded to version 4.10.0, and it works.
Should be fixed with the latest version I just published, but I'm not quite sure tbh, this was a tricky one. Please let me know if you encounter more issues
As per your provided configuration, When we added the below lines and run our spec file we got this error.
In your cypress/support/e2e.js add the following: const mongo = require('cypress-mongodb'); mongo.addCommands();
Spec file snapshot attahced for refernece.
Error snapshot is attached for reference. Pakage,json
{ "name": "cypress", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "keywords": [], "author": "", "license": "ISC", "dependencies": { "cypress": "^10.9.0", "cypress-downloadfile": "^1.2.3", "npm-check-updates": "^16.3.11" }, "devDependencies": { "cypress-file-upload": "^5.0.8", "cypress-mochawesome-reporter": "^3.2.3", "cypress-xpath": "^2.0.1", "multiple-cucumber-html-reporter": "^3.0.1" } }