stencil-community / stencil-app-starter

Minimal starter project for building web components with Stencil
https://github.com/ionic-team/stencil
MIT License
320 stars 102 forks source link

Build fails with errors "TypeError: Cannot read property 'toString' of undefined " #64

Closed suriyakumarcs closed 2 years ago

suriyakumarcs commented 5 years ago

When i run npm run build i have get this error.

TypeError: Cannot read property 'toString' of undefined at e.getRenderedHash (/home/ubuntu/Vue/my-stencil-app/node_modules/@stencil/core/dist/sys/node/index.js:1:324262) at /home/ubuntu/Vue/my-stencil-app/node_modules/@stencil/core/dist/sys/node/index.js:1:325017 Can you help me on this!?

lukasIO commented 5 years ago

having the same problem

edit: solved for me by upgrading to 0.17.0 the app-starter repio still has a 0.16 version

ernestdolog commented 5 years ago

Updated "@stencil/core": "~0.16.2" to "@stencil/core": "~0.17.0". Works.

alvis commented 5 years ago

can confirm that updating @stencil/core resolves the issue.

apiel commented 5 years ago

I freshly install stencil and get the same issue on build. After running npm install @stencil/core@latest --save-exact, build work but I would expect it to work from the beginning. (this was my first attempt to use stenciljs)

jdnichollsc commented 4 years ago

I'm having this error building the component:

[20:14.1]  @stencil/core v1.5.3 🐊
[20:14.2]  build, ionphaser, prod mode, started ...
[20:14.2]  transpile started ...
TypeError: Cannot read property 'toString' of undefined at node.typeArguments.filter.forEach
           (/Users/jdnichollsc/dev/proyecto26/ion-phaser-ce/node_modules/@stencil/core/dist/compiler/index.js:4242:63)
           at Array.forEach (<anonymous>) at visit
           (/Users/jdnichollsc/dev/proyecto26/ion-phaser-ce/node_modules/@stencil/core/dist/compiler/index.js:4240:22)
           at visitNode
           (/Users/jdnichollsc/dev/proyecto26/ion-phaser-ce/node_modules/typescript/lib/typescript.js:17007:24) at
           Object.forEachChild
           (/Users/jdnichollsc/dev/proyecto26/ion-phaser-ce/node_modules/typescript/lib/typescript.js:17135:21) at
           visit
           (/Users/jdnichollsc/dev/proyecto26/ion-phaser-ce/node_modules/@stencil/core/dist/compiler/index.js:4246:30)
           at getAllTypeReferences
           (/Users/jdnichollsc/dev/proyecto26/ion-phaser-ce/node_modules/@stencil/core/dist/compiler/index.js:4248:5)
           at getAttributeTypeInfo
           (/Users/jdnichollsc/dev/proyecto26/ion-phaser-ce/node_modules/@stencil/core/dist/compiler/index.js:4219:5)
           at parseMethodDecorator
           (/Users/jdnichollsc/dev/proyecto26/ion-phaser-ce/node_modules/@stencil/core/dist/compiler/index.js:7415:108)
           at decoratedProps.filter.map.method
           (/Users/jdnichollsc/dev/proyecto26/ion-phaser-ce/node_modules/@stencil/core/dist/compiler/index.js:7370:24)
rwaskiewicz commented 2 years ago

👋

I apologize it took so long for a member of the Stencil team to acknowledge this issue. This appears to be fixed in v2+ of Stencil and in this starter. I'm going to close this issue, but if it pops back up please feel free to open a new issue. Thanks!