Skip to content

bug: TypeError: Cannot read properties of null (reading 'nodeType') is still happening in the latest version #6396

Closed

Description

@VZinii

Prerequisites

Stencil Version

4.37.1

Current Behavior

I found an existing issue about the TypeError: Cannot read properties of null (reading 'nodeType') error. A fix for it was released in version 4.25.1, but the error is still happening in the latest version when taskQueue="immediate" is set and a prop has {reflect: true}.

I published a demo on Vercel: https://stencil-demo-issue.vercel.app

Image

Expected Behavior

Not throwing NodeType error with this project configuration

System Info

System: node 22.14.0
Platform: linux (6.8.0-83-generic)
CPU Model: Intel(R) Core(TM) i5-10210U CPU @ 1.60GHz (8 cpus)
Compiler: /home/vitor.zini/Documentos/Sandbox/my-stencil-project/node_modules/.pnpm/@[email protected]/node_modules/@stencil/core/compiler/stencil.js
Build: 1758315275
Stencil: 4.37.1 🏰
TypeScript: 5.5.4
Rollup: 4.34.9
Parse5: 7.2.1
jQuery: 4.0.0-pre
Terser: 5.37.0

Steps to Reproduce

  1. Create a new component.
  2. Set a prop with {reflect: true}
  3. Set taskQueue to "immediate"
  4. Create a click listener that changes the prop's value: If the prop has a value, set it to undefined. If not, assign a value to it.

After that, each click should trigger the NodeType error.

Code Reproduction URL

https://github.com/VZinii/stencil-demo-issue

Additional Information

No response

Activity

  1. guilhermegia commented on Sep 26, 2025

    @guilhermegia

    same here

  2. celo-rod commented on Sep 26, 2025

    @celo-rod

    I'm experiencing the same issue

  3. added
    Bug: Validated
    on Sep 26, 2025
  4. guilhermegia commented on Sep 26, 2025

    @guilhermegia

    hello @johnjenkins

    Some workaround for it?

    In my project, I cannot change the taskQueue and I cannot remove the reflect:true from my prop.

  5. guilhermegia commented on Oct 1, 2025

    @guilhermegia
  6. VZinii commented on Oct 1, 2025

    @VZinii
    Author

    Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bug: ValidatedHelp Wanted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions