Skip to content

bug: TypeError: elm.dispatchEvent is not a function #6415

@Cliffback

Description

@Cliffback

Prerequisites

Stencil Version

=4.36.1

Current Behavior

Upgrading from 4.36.0 to 4.36.1 we get TypeError: elm.dispatchEvent is not a function when running tests with vitest.

Same issue occurs with newer versions.

emitEvent node_modules/@stencil/core/internal/client/index.js?app-data=conditional:2701:5

Expected Behavior

Worked fine until upgrading

System Info

System: node 22.19.0
    Platform: linux (6.6.87.2-microsoft-standard-WSL2)
   CPU Model: 12th Gen Intel(R) Core(TM) i7-12800HX (24 cpus)
    Compiler: /home/username/dev/tmp/my-project/node_modules/@stencil/core/compiler/stencil.js
       Build: 1757722623
     Stencil: 4.37.0
  TypeScript: 5.5.4
      Rollup: 4.34.9
      Parse5: 7.2.1
      jQuery: 4.0.0-pre
      Terser: 5.37.0

Steps to Reproduce

To set up a reproducable case public would take some time.

Code Reproduction URL

N/A

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions