-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
TypeError: Cannot read properties of undefined (reading 'length'), error when using with vitest #30
Comments
That's odd. I'm going to investigate this. |
So it seems that vitest calls the I'm not sure whether this is vitest or vite misbehaving but this is clearly a bug on one of these tools. I'll need to further investigate before I file an issue to the relevant repo. Meanwhile, I just published version 7.1.2 that has a workaround for this. Thanks again. |
Turns out the Vitest team is already aware of the problem 🙂 |
Thanks for the prompt help.
I should have searched better for the error before filing this issue.
…On Thu, Apr 25, 2024, 12:37 PM Stephan Schreiber ***@***.***> wrote:
Turns out the Vitest team is already aware of the problem 🙂
- vitest-dev/vitest#5616
<vitest-dev/vitest#5616>
- vitest-dev/vitest#5479
<vitest-dev/vitest#5479>
—
Reply to this email directly, view it on GitHub
<#30 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAB7XI6LMQ3JVKAD2FMYE7TY7EWOJAVCNFSM6AAAAABGX2ZG3CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANZXG4YTCMZZGQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Hi,
Thanks for this plugin.
I have been using this in one of my projects without any issuess untill recent past with vitest/vite.
However I have upgraded the plguin version from 7.0.1 to 7.1.1 and since then when I run the
vitest run
orvitest
, I am getting the errorTypeError: Cannot read properties of undefined (reading 'length'),
(thrown in theresolveId
call) and the process is exiting.The same code is working fine with v 7.0.1 of this plugin.
I think the introduction of the
'order': 'pre'
of theresolveId
function could be triggering this. https://github.com/Septh/rollup-plugin-node-externals/blob/main/source/index.ts#L231Stackblitz with v7.0.1 works fine: https://stackblitz.com/edit/vitest-dev-vitest-ydhtdg?file=package.json
Stackblitz with v7.1.1 fails: https://stackblitz.com/edit/vitest-dev-vitest-jlcazj?file=package.json
The text was updated successfully, but these errors were encountered: