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
Error: [CORE - LIT-STATIC-PROPERTIES]: Looks like you've hit an error in the core library. #163
Comments
could you post some reproduction code please? :) Seems like custom-elements-manifest/packages/analyzer/src/features/framework-plugins/lit/static-properties.js Line 75 in e5eca5b
which we get from here custom-elements-manifest/packages/analyzer/src/features/framework-plugins/lit/static-properties.js Line 18 in e5eca5b
is not found for some reason, gotta figure out why, but need some reproduction code/playground url to be able to investigate Not sure why different node versions would have anything to do with it though, we don't really do anything exotic in that regard. |
import {LitElement, TemplateResult, html} from "lit"; @CustomElement("si-ui-blueprint-webcomponent")
} |
lit version is: "lit": "2.2.1", |
Im not able to reproduce locally or in the playground Do note that you're importing import {customElement, property} from "lit/decorators.js"; but using it with a capital: @CustomElement("si-ui-blueprint-webcomponent") |
@CustomElement -> git automatically capitalized it |
in my code it's lowercase "c" |
ok i will try to find out where the problem is and i will report here. If i remove "--litElement" flag it works... |
exact environment : node: v16.14.2, npm: 8.5.0 |
@domoskanonos Have you found a solution for this? I'm having the same issue, but I'm trying for days to find the source since it randomly appeared without really changing or updating anything. As soon as I find a minimal example without 300 lines of code, I'll post it here. |
To add to this: The error already happens when running "npm install", not even while transpiling with run/build |
I fixed this issue in the createClass.js by checking for classTemplate.members existence and initialize it with empty array if undefined old:
new:
I tried to push a fix branch to create a pullrequest, but I don't have the rights |
I had this issue (independent of which node version I was running, i tried 14 and 16). Version: I was able to fix by being verify specific about what code to include via --glob. For a project im working on This works:
This does not
and this does not
Obviously YMMV but changing this command got me up and running again. Im assuming there is some code in my project that is causing the issue and I should have been using globs all along |
NPM command: custom-elements-manifest analyze --outdir public/ --litelement --dev
with node version 14.17.0 everything works fine, version 16.14.2 broken with error:
TypeError: Cannot read properties of undefined (reading 'push')
at mapClassMember (file:///C:/machineroom/git/ui-blueprint-webcomponent/blueprint-frontend/node_modules/@custom-elements-manifest/analyzer/src/features/analyse-phase/creators/createClass.js:242:27)
at file:///C:/machineroom/git/ui-blueprint-webcomponent/blueprint-frontend/node_modules/@custom-elements-manifest/analyzer/src/features/analyse-phase/creators/createClass.js:211:35
at Array.forEach ()
at visitNode (file:///C:/machineroom/git/ui-blueprint-webcomponent/blueprint-frontend/node_modules/@custom-elements-manifest/analyzer/src/features/analyse-phase/creators/createClass.js:211:12)
at visitNodes (C:\machineroom\git\ui-blueprint-webcomponent\blueprint-frontend\node_modules@custom-elements-manifest\analyzer\node_modules\typescript\lib\typescript.js:29004:30)
at Object.forEachChild (C:\machineroom\git\ui-blueprint-webcomponent\blueprint-frontend\node_modules@custom-elements-manifest\analyzer\node_modules\typescript\lib\typescript.js:29316:21)
at visitNode (file:///C:/machineroom/git/ui-blueprint-webcomponent/blueprint-frontend/node_modules/@custom-elements-manifest/analyzer/src/features/analyse-phase/creators/createClass.js:216:8)
at getDefaultValuesFromConstructorVisitor (file:///C:/machineroom/git/ui-blueprint-webcomponent/blueprint-frontend/node_modules/@custom-elements-manifest/analyzer/src/features/analyse-phase/creators/createClass.js:200:3)
at analyzePhase (file:///C:/machineroom/git/ui-blueprint-webcomponent/blueprint-frontend/node_modules/@custom-elements-manifest/analyzer/src/features/framework-plugins/lit/static-properties.js:75:11)
at file:///C:/machineroom/git/ui-blueprint-webcomponent/blueprint-frontend/node_modules/@custom-elements-manifest/analyzer/src/create.js:104:23
The text was updated successfully, but these errors were encountered: