Skip to content
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

bug: project builds failing after upgrading to 4.20.0 #5940

Closed
3 tasks done
cyfrost opened this issue Aug 13, 2024 · 2 comments · Fixed by #5942
Closed
3 tasks done

bug: project builds failing after upgrading to 4.20.0 #5940

cyfrost opened this issue Aug 13, 2024 · 2 comments · Fixed by #5942
Labels
Bug: Validated This PR or Issue is verified to be a bug within Stencil

Comments

@cyfrost
Copy link

cyfrost commented Aug 13, 2024

Prerequisites

Stencil Version

4.20.0

Current Behavior

Hello,

I've recently upgraded a stencil project from v4.19.2 to v4.20.0 after which the builds have started failing.

Here is the build command I've been using always: stencil build --ci --prod --config=stencil-prod.config.ts

The error reads TypeError: Cannot read properties of undefined (reading 'kind') at Object.isClassDeclaration, I think node.parent is undefined while parsing componentMembers. please refer to the screecap below:

image

I believe this failure can be attributed to TypeScript upgrade from 5.4.5 to 5.5 (#5898), having checked the compiler's stencil.js file by comparing them between the upgrades:

stencil.js (v4.19.2)
image

stencil.js (v4.20.0)
image

Expected Behavior

Project build should complete successfully

System Info

System: node 20.16.0
    Platform: darwin (23.6.0)
   CPU Model: Apple M1 (8 cpus)
    Compiler: /node_modules/@stencil/core/compiler/stencil.js
       Build: 1722623140
     Stencil: 4.20.0 🚐
  TypeScript: 5.5.3
      Rollup: 2.56.3
      Parse5: 7.1.2
      jQuery: 4.0.0-pre
      Terser: 5.31.1

Steps to Reproduce

This may not be reproducible in a new stencil starter app. However, I'm hoping to understand why this has occurred and if there's a workaround or known solution

Code Reproduction URL

null

Additional Information

No response

@ionitron-bot ionitron-bot bot added the triage label Aug 13, 2024
@cyfrost
Copy link
Author

cyfrost commented Aug 13, 2024

Just identified the culprit to be a getter called shadowRoot in one of the components which is now explicitly disallowed after #5912

I was able to rename the getter and the builds have since been successful.

Here is how the getter looks now:

  private get currentShadowRootRef(): ShadowRoot {
    return this.el.shadowRoot;
  }

Closing this, please feel free to reopen if there's any suggestion.

@christian-bromann
Copy link
Member

A fix for this bug has been published in Stencil v4.21.0!

@christian-bromann christian-bromann added Bug: Validated This PR or Issue is verified to be a bug within Stencil and removed triage labels Aug 26, 2024
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug: Validated This PR or Issue is verified to be a bug within Stencil
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants