ionic-team / stencil

A toolchain for building scalable, enterprise-ready component systems on top of TypeScript and Web Component standards. Stencil components can be distributed natively to React, Angular, Vue, and traditional web developers from a single, framework-agnostic codebase.
https://stenciljs.com
Other
12.55k stars 784 forks source link

bug: stencil build throws errors from node_modules #5462

Closed candiotti-ca closed 7 months ago

candiotti-ca commented 7 months ago

Prerequisites

Stencil Version

2.13.0

Current Behavior

When using some dependencies in the project (i.e. i18next), the build fails ans points out errors from the library.

Expected Behavior

No errors from node_modules

System Info

System: node 21.6.1 Plaform: windows (10.0.22000) CPU Model: Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz (8 cpus) Compiler: ...\stencil-i18next\node_modules\@stencil\core\compiler\stencil.js Build: 20220124181123 Stencil: 2.13.0 TypeScript: 4.3.5 Rollup: 2.42.3 Parse5: 6.0.1 Sizzle: 2.42.3 Terser: 5.6.1

Steps to Reproduce

  1. Create a stencil app
  2. Install i18next dependency: npm i i18next
  3. Just import i18next from 'i18next' in index.ts or app-root.tsx triggers the error
  4. Run npm run build ans see error in terminal

Code Reproduction URL

https://github.com/candiotti-ca/stencil-i18next

Additional Information

I tried to use this library in an Angular project, and everything is working fine.

I also tried to use other npm packages in the stencil app (@material/web)

rwaskiewicz commented 7 months ago

Hey @candiotti-ca 👋

Stencil v2 is no longer supported as of Jan 25, 2024. Can you please update your reproduction case to use Stencil v4 and verify if the issue still exists?

ionitron-bot[bot] commented 7 months ago

Thanks for the issue! This issue has been labeled as needs reproduction. This label is added to issues that need a code reproduction.

Please reproduce this issue in an Stencil starter component library and provide a way for us to access it (GitHub repo, StackBlitz, etc). Without a reliable code reproduction, it is unlikely we will be able to resolve the issue, leading to it being closed.

If you have already provided a code snippet and are seeing this message, it is likely that the code snippet was not enough for our team to reproduce the issue.

For a guide on how to create a good reproduction, see our Contributing Guide.

candiotti-ca commented 7 months ago

Oh my... I've used npm init stencil to create my project and I didn't check the dependencies version as I trusted the script. That was the issue, many thanks and sorry for that...

rwaskiewicz commented 7 months ago

Understandable! Stencil "App"s are no longer an officially supported use case by Ionic, which is why that option in the CLI belongs to the Stencil Community these days. At the time of this writing, that starter still hasn't upgraded to v4 just yet, which is why you see that.

I'm going to close this out, but please feel free to open a new issue if this appears when using the Stencil Component Starter/Stencil v4. Thanks!