Skip to content

Conversation

@gribnoysup
Copy link
Collaborator

@gribnoysup gribnoysup commented Jan 22, 2025

There is currenly an ELSPROBLEMS error on main caused by the version of puppeteer-core being mismatched with the one specified by webdriver:

npm ls puppeteer-core                                                                                                                                                                                     1 ↵
mongodb-compass-monorepo@ ./compass
└─┬ [email protected] -> ./packages/compass-e2e-tests
  ├── [email protected]
  └─┬ [email protected]
    └── [email protected] deduped invalid: "^22.3.0" from packages/compass-e2e-tests/node_modules/webdriverio

npm error code ELSPROBLEMS
npm error invalid: [email protected] ./compass/node_modules/puppeteer-core

This patch is a fix for that and for the ci task that's supposed to be checking that. When I added it initially, I forgot to actually exit with a non-zero code there so that it actually fails the task 🤦

EDIT: so initially I tried downgrading, but we actually depend on puppeteer-core@23 so that firefox installation works, so instead of downgrading, I'm overriding the dependency version in webdriverio to allow installing it without ELSPROBLEMS errors, the steps are not straightforward to actually make that happen so I'll document them here for posterity:

  • uninstall both puppeteer-core and webdriverio from the package to remove both from package-lock
  • add overrides section to the root package.json
  • install webdriverio first
    this makes sure that overrides applies to the package-lock record for the package
  • install puppeteer-core
    if the order is switched, webdriverio installation will fail because npm first does the version check and only then applies overrides

@gribnoysup gribnoysup added no release notes Fix or feature not for release notes no-title-validation Skips validation of PR titles (conventional commit adherence + JIRA ticket inclusion) labels Jan 22, 2025
@github-actions github-actions bot added the fix label Jan 22, 2025
@gribnoysup gribnoysup force-pushed the fix-elsproblems-issues-and-actually-throw branch from f651d39 to 3fdd3e6 Compare January 23, 2025 11:03
@gribnoysup gribnoysup force-pushed the fix-elsproblems-issues-and-actually-throw branch from 3fdd3e6 to 04a8cae Compare January 23, 2025 13:30
Comment on lines +98 to +103
"enzyme": {
"cheerio": "1.0.0-rc.10"
},
"chai-enzyme": {
"cheerio": "1.0.0-rc.10"
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another fun override in this fix: enzyme lists 1.0.0-rc version with a caret, which makes npm dedupe it with stable version 1.0.0 that webdriverio uses, but this version actually doesn't work with enzyme, so we're overriding enzyme to use exact rc. Hopefully that's the last one that was causing issues 🤞

I'm itching to just go through the handful of files that are still using enzyme and refactor those tests now...

@gribnoysup gribnoysup merged commit 509606f into main Jan 23, 2025
32 checks passed
@gribnoysup gribnoysup deleted the fix-elsproblems-issues-and-actually-throw branch January 23, 2025 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix no release notes Fix or feature not for release notes no-title-validation Skips validation of PR titles (conventional commit adherence + JIRA ticket inclusion)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants