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

6.1.0 @adobe/css-tools crashing #524

Closed
wojtekmaj opened this issue Aug 23, 2023 · 11 comments · Fixed by #525
Closed

6.1.0 @adobe/css-tools crashing #524

wojtekmaj opened this issue Aug 23, 2023 · 11 comments · Fixed by #525
Labels
bug Something isn't working released

Comments

@wojtekmaj
Copy link
Contributor

wojtekmaj commented Aug 23, 2023

  • @testing-library/jest-dom version: 6.1.0
  • node version: 18
  • npm (or yarn) version: yarn 3.6.0

Relevant code or config:

n/a

What you did:

Ran basic React tests, working fine with jest-dom@5, after updating to jest-dom@6 (this is important - NOT a clear install).

What happened:

SyntaxError: Named export 'parse' not found. The requested module '@adobe/css-tools' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:

import pkg from '@adobe/css-tools';
const { parse } = pkg;

Problem description:

The required version of @adobe/css-tools jest-dom declares, ^4.0.1, is NOT correct. In my lockfile, it has already been resolved to 4.2.0. This hasn't changed with jest-dom@6 update, because ^4.0.1 is still the desired version range. This produced the error above.

After investigation, it turned out @adobe/css-tools 4.3.0 is the first release with ESM support.

Suggested solution:

Bump minimum @adobe/css-tools dependency to ^4.3.0.

@SteKoe
Copy link
Contributor

SteKoe commented Aug 23, 2023

PR #523 solves this, too.

@filiptammergard
Copy link

filiptammergard commented Aug 23, 2023

Related to #522?

@cedeber
Copy link

cedeber commented Aug 23, 2023

I updated from 5.17.0 and it is still present in 6.1.1. I still have @adobe/css-tools with 4.2.0.
Although a fresh install installs @adobe/css-tools with 4.3.1 and it does not report the bug anymore.

@jgoz
Copy link
Collaborator

jgoz commented Aug 23, 2023

#525

@nickserv
Copy link
Member

I can't reproduce this issue. Can someone please either explain the environment they're using or link to a reproduction?

@nickserv nickserv added bug Something isn't working needs discussion We need to discuss this to come up with a good solution labels Aug 23, 2023
@keerthana-tw

This comment was marked as off-topic.

@jgoz
Copy link
Collaborator

jgoz commented Aug 24, 2023

@nickmccurdy I also had a really hard time reproducing this, but I was able to get the same error message with the following setup:

  1. Jest in ESM mode
  2. Pin @adobe/css-tools at 4.0.x

https://github.com/jgoz/jest-dom-524

@wojtekmaj
Copy link
Contributor Author

Similarly, I was running Vitest (so, obviously ESM) and @adobe/css-tools was at 4.2.0 in my lockfile. Letting @adobe/css-tools bump to 4.3.1 immediately fixed the issue.

@wand2016
Copy link

+1

yarn add @adobe/[email protected]
npx yarn-deduplicate
yarn remove @adobe/css-tools

This fixed the issue.

@indooorsman

This comment was marked as off-topic.

@github-actions
Copy link

🎉 This issue has been resolved in version 6.1.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

@nickserv nickserv removed the needs discussion We need to discuss this to come up with a good solution label Aug 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants