Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the 6.4.3 have an issue of Cannot find module 'lodash/isEqualWith' #598

Closed
arvinxx opened this issue May 3, 2024 · 14 comments · Fixed by #599
Closed

the 6.4.3 have an issue of Cannot find module 'lodash/isEqualWith' #598

arvinxx opened this issue May 3, 2024 · 14 comments · Fixed by #599

Comments

@arvinxx
Copy link

arvinxx commented May 3, 2024

  • @testing-library/jest-dom version: 6.4.3
  • node version: 20.9.0
  • jest (or vitest) version: [email protected]
  • npm (or yarn) version: 9.2.0

Relevant code or config:

we have tests run correctly in 6.4.2 , but failed in 6.4.3

What you did:

npm run test

What happened:

Error: Cannot find module '/Users/arvinxx/CodeProjects/LobeHub/lobe-chat/node_modules/.pnpm/@[email protected][email protected]_@[email protected]_@[email protected][email protected][email protected]_/node_modules/lodash/isEqualWith' imported from /Users/arvinxx/CodeProjects/LobeHub/lobe-chat/node_modules/.pnpm/@[email protected][email protected]_@[email protected]_@[email protected][email protected][email protected]_/node_modules/@testing-library/jest-dom/dist/index.mjs
Did you mean to import [email protected]/node_modules/lodash/isEqualWith.js?

you can check the test ci here: https://github.com/lobehub/lobe-chat/actions/runs/8935588080/job/24544431213

Reproduction:

https://github.com/lobehub/lobe-chat/tree/reproduction/jest-dom-6.4.3

Problem description:

it shows the lodash/isEqualWith can not be found

Suggested solution:

I think the issue caused by the change of this: v6.4.2...v6.4.3#diff-26a76dbc98134c4a252853d189242826b97531753657672282afdd05d608dfac

it should be the import isEqualWith from 'lodash/isEqualWith.js'

@arvinxx arvinxx changed the title the 6.4.3 have an issue of 'Cannot find module 'lodash/isEqualWith' the 6.4.3 have an issue of Cannot find module 'lodash/isEqualWith' May 3, 2024
@aurorascharff
Copy link

aurorascharff commented May 3, 2024

I encountered this as well. Inspecting my node_modules/@testing-library/jest-dom/dist/node-modules, there is no lodash in here, only dom-accessibility-api (missing also other packages) from node_modules/@testing-library/jest-dom/dist/index.ts:

require('redent');
require('@adobe/css-tools');
require('dom-accessibility-api');
require('aria-query');
require('chalk');
require('lodash/isEqualWith'); // this one is the failing one
require('css.escape');

@aurorascharff
Copy link

aurorascharff commented May 3, 2024

Looking at commits:
There is this 1 commit between 6.4.2 and 6.4.3 that isn't in in the release log but contains changes that might be relevant.

bd82f64

image
image

@larsmunkholm
Copy link

Please fix 😭

@rhummelmose
Copy link

Guys come on... :D

@ddolcimascolo
Copy link
Contributor

Hit by this too. Do you need any help guys?

@ddolcimascolo
Copy link
Contributor

Looking at commits: There is this 1 commit between 6.4.2 and 6.4.3 that isn't in in the release log but contains changes that might be relevant.

bd82f64

image image

@re-taro Can you check?

@drazenbuljovcic
Copy link

Hit by this just now as well.
Obv before the issue if fixed you can pin to 6.4.2.

@MatanBobi
Copy link
Member

Just encountered this one too, I've created a PR. Thanks everyone for the report :)

@ddolcimascolo
Copy link
Contributor

Any ETA?

@KevBeltrao
Copy link

any temporary fix?

@timothyokooboh
Copy link

Currently stuck because of this issue

@philwolstenholme
Copy link

There's no need for this to block anyone or to rush the maintainers to release a fix, just downgrade to the last working version. Google for something like 'npm install specific version'.

I am on my phone so this might not be 100% copy/pastable but try something like npm i "@testing-library/[email protected]" --save-dev

@MatanBobi
Copy link
Member

🎉 This fix is included in version 6.4.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

james-em added a commit to james-em/svelecte that referenced this issue May 3, 2024
@okize
Copy link

okize commented May 3, 2024

v6.4.5 fixed the issue for me, thank you for the fast fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.