Skip to content

Update version of happy-dom peer dependency #1445

@dovca

Description

@dovca

In the light of this vulnerability, please consider updating the version of happy-dom to ^20.0.0

When I update happy-dom to the fixed version in my package.json, the npm install command fails:

npm warn ERESOLVE overriding peer dependency
npm warn While resolving: [email protected]
npm warn Found: [email protected]
npm warn node_modules/happy-dom
npm warn   dev happy-dom@"^20.0.0" from the root project
npm warn   2 more (@nuxt/test-utils, vitest)
npm warn
npm warn Could not resolve dependency:
npm warn peerOptional happy-dom@"^9.10.9 || ^10.0.0 || ^11.0.0 || ^12.0.0 || ^13.0.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0" from @nuxt/[email protected]
npm warn node_modules/@nuxt/test-utils
npm warn   dev @nuxt/test-utils@"^3.19.2" from the root project
npm warn   1 more (vitest-environment-nuxt)
npm error code ERESOLVE
npm error ERESOLVE could not resolve
npm error
npm error While resolving: @nuxt/[email protected]
npm error Found: [email protected]
npm error node_modules/happy-dom
npm error   dev happy-dom@"^20.0.0" from the root project
npm error   peerOptional happy-dom@"*" from [email protected]
npm error   node_modules/vitest
npm error     dev vitest@"^3.2.4" from the root project
npm error     peerOptional vitest@"^3.2.0" from @nuxt/[email protected]
npm error     node_modules/@nuxt/test-utils
npm error       dev @nuxt/test-utils@"^3.19.2" from the root project
npm error       1 more (vitest-environment-nuxt)
npm error
npm error Could not resolve dependency:
npm error peerOptional happy-dom@"^9.10.9 || ^10.0.0 || ^11.0.0 || ^12.0.0 || ^13.0.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0" from @nuxt/[email protected]
npm error node_modules/@nuxt/test-utils
npm error   dev @nuxt/test-utils@"^3.19.2" from the root project
npm error
npm error Conflicting peer dependency: [email protected]
npm error node_modules/happy-dom
npm error   peerOptional happy-dom@"^9.10.9 || ^10.0.0 || ^11.0.0 || ^12.0.0 || ^13.0.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0" from @nuxt/[email protected]
npm error   node_modules/@nuxt/test-utils
npm error     dev @nuxt/test-utils@"^3.19.2" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.

This is most likely because @nuxt/test-utils doesn't allow happy-dom@^20 as a valid peer dependency.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions