Build fails with errors "TypeError: Cannot read property 'toString' of undefined "
suriyakumarcs opened this issue ยท 6 comments
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!?
having the same problem
edit: solved for me by upgrading to 0.17.0 the app-starter repio still has a 0.16 version
Updated "@stencil/core": "~0.16.2" to "@stencil/core": "~0.17.0". Works.
can confirm that updating @stencil/core resolves the issue.
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)
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)
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!