Skip to content

bug: TypeError: Cannot read properties of null (reading 'nodeType') #6114

Closed

Description

@will-hu-0

Prerequisites

Stencil Version

4.23.2+

Current Behavior

The code is here: https://stackblitz.com/~/github.com/will-hu-0/stenciljs-demo-issue , a straightforward component with pagination buttons and a list.

It throws TypeError: Cannot read properties of null (reading 'nodeType') when clicking prev or next buttons if using stencil/core V4.23.2 +,

However all is good on V4.23.0.

Image

Expected Behavior

No error is thrown.

System Info

System: node 18.17.1
    Platform: darwin (24.2.0)
   CPU Model: Apple M1 Pro (8 cpus)
    Compiler: /Users/will/Work/zComm/stenciljs-demo-issue/node_modules/@stencil/core/compiler/stencil.js
       Build: 1737085023
     Stencil: 4.24.0 🚜
  TypeScript: 5.5.4
      Rollup: 2.56.3
      Parse5: 7.1.2
      jQuery: 4.0.0-pre
      Terser: 5.31.1

Steps to Reproduce

After loading the list, click "Previous" or "Next" button.

Code Reproduction URL

https://github.com/will-hu-0/stenciljs-demo-issue

Additional Information

No response

Activity

  1. johnjenkins commented on Jan 23, 2025

    @johnjenkins
    Contributor

    Thanks for the repro!
    Seems to be an issue with the async re-render. Will look into it asap.
    In the meantime, this issue can be mitigated by setting taskQueue: 'immediate' in stencil.config.ts

  2. added
    Bug: Validated
    and removed on Jan 23, 2025
  3. christian-bromann commented on Jan 25, 2025

    @christian-bromann
    Member

    A fix for this has been released today as part of Stencil v4.25.1!

  4. will-hu-0 commented on Feb 6, 2025

    @will-hu-0
    Author

    By using the latest version, it looks good! Thanks for the quick fix.

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