Open karthikeyan-arumugam-1558 opened 3 days ago
@karthikeyan-arumugam-1558 any chance you can provide a minimal reproducible example?
@christian-bromann, since it's a build-time error, how would you expect the example to be?
@karthikeyan-arumugam-1558 can you maybe provide a setup that reproduces the build error? It seems like you are using a Jest context, it is important for us to know if you are using Jest as a testrunner or the Stencil testrunner which uses Jest under the hood.
@karthikeyan-arumugam-1558 I've added a commit to #5873 which adds a require export for this path. This seems very odd to me though since the file contents are meant to be consumed within a ESM context (in the browser).
sadly this error occurs in an angular + ionic project as well, when testing with jest.
those tests where failing since 4.18.2 (https://github.com/ionic-team/stencil/issues/5786).
With 4.19.1 i get the error of that issue:
Cannot find module '@stencil/core/internal/client' from '../../node_modules/@ionic/core/components/index.js'
Part of the require stack:
Require stack:
/node_modules/@ionic/core/components/index.js
/node_modules/@ionic/angular/fesm2022/ionic-angular-common.mjs
/node_modules/@ionic/angular/fesm2022/ionic-angular-standalone.mjs
I changed nothing in the jest.config. So i have something similar to that in there, which was working before.
{
...
transformIgnorePatterns: [
'node_modules/(?!(@ionic/angular|@ionic/core|ionicons|@stencil/core|@angular/*))'
],
...
}
Prerequisites
Stencil Version
4.19.0
Current Behavior
I consume our component library as a dist-custom-elements in my React project using Vite bundler. Until I used 4.18.3 of @stencil/core, I didn't face this error. Started seeing this from 4.19.0.
Expected Behavior
This error shouldn't be thrown
System Info
Steps to Reproduce
Ours is a private component library, but install any Stencil-based component library that uses @stencil/core@4.19.0, consume a component from dist-custom-elements and try to build the consuming application.
Code Reproduction URL
NA
Additional Information