-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
ES module import fails with v1.5.0 (but works up to v1.4.0) #5573
Comments
Hello @NiasSt90. Please provide a minimal reproduction using a GitHub repository or StackBlitz (you can also use examples). Issues marked with |
Facing a similar issue with SyntaxError: '*[role~="heading"],h1,h2,h3,h4,h5,h6' is not a valid selector
❯ emit node_modules/.pnpm/nwsapi@2.2.8/node_modules/nwsapi/src/nwsapi.js:557:17
❯ Object._querySelectorAll [as select] node_modules/.pnpm/nwsapi@2.2.8/node_modules/nwsapi/src/nwsapi.js:1501:9
❯ HTMLDivElementImpl.querySelectorAll node_modules/.pnpm/jsdom@22.1.0/node_modules/jsdom/lib/jsdom/living/nodes/ParentNode-impl.js:78:26
❯ HTMLDivElement.querySelectorAll node_modules/.pnpm/jsdom@22.1.0/node_modules/jsdom/lib/jsdom/living/generated/Element.js:1119:58
❯ queryAllByRole node_modules/.pnpm/@testing-library+dom@9.3.4/node_modules/@testing-library/dom/dist/queries/role.js:121:31
❯ node_modules/.pnpm/@testing-library+dom@9.3.4/node_modules/@testing-library/dom/dist/query-helpers.js:74:17
❯ node_modules/.pnpm/@testing-library+dom@9.3.4/node_modules/@testing-library/dom/dist/query-helpers.js:52:17
❯ node_modules/.pnpm/@testing-library+dom@9.3.4/node_modules/@testing-library/dom/dist/query-helpers.js:95:19
❯ src/pages/accounts/verify/AccountVerifyPage.spec.tsx:303:43
301| expect(dialog).toBeVisible()
302|
303| const alertTitle = within(dialog).getByRole('heading', {
| ^
304| name: /translated_error/i,
305| }) |
Same here. Cannot make a repro for the moment. But |
This could be relevant if your dependency uses a path like I see it as a packaging issue since NodeJs cannot probably import such deps either. So, the workaround is to use |
I don’t think this is it. I can import the dep using standard node: node << EOF
(async() => console.log(await import("module")))()
EOF do work. I'm usually loading it using |
But the problem could be related to the provided patch though. I do have both I observe 2 breakings on the same type of modules : What I think it means is that the codebase for valid node imports is somehow broken. It was not visible before because it was hidden by the fact it was not used in those cases. |
thanks, that looks exactly like the cause of my problem. Now i'm trying to understand what is wrong with our library ;) |
Describe the bug
@mui/x-date-pickers
is a peerDependency from@intentus/bvo-theme-react
(a bundled ESM library).Until vitest=v1.4.0 everything worked fine.
With v1.5.0 it crashes every time a test (or the production code from this test) uses an import of the
@intentus/bvo-theme-react
library.Reproduction
Currently i don't know how to create an reproducer.
The (esm) module
@intentus/bvo-theme-react
is not public available.System Info
Used Package Manager
yarn
Validations
The text was updated successfully, but these errors were encountered: