Skip to content
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

bug: Cannot find module '@stencil/core/testing/jest-preset' after upgrading to Stencil 4.19.2 #5896

Closed
3 tasks done
geovanesantana opened this issue Jul 15, 2024 · 4 comments · Fixed by #5900 · May be fixed by AnirudhJalagam/ionic-frameworkss#2
Closed
3 tasks done
Labels
Bug: Validated This PR or Issue is verified to be a bug within Stencil

Comments

@geovanesantana
Copy link

Prerequisites

Stencil Version

4.19.2

Current Behavior

This error occurs when trying to import moduleNameMapper from @stencil/core/testing/jest-preset in the Stencil configuration file:

import { moduleNameMapper } from '@stencil/core/testing/jest-preset';

### Expected Behavior

Should work as it did in previous versions, allowing the use of `moduleNameMapper` from `@stencil/core/testing/jest-preset`.

### System Info

```shell
Node 20.11.1
PNPM 9.3.0
CPU Model: Apple M3
Stencil: 4.19.2

Steps to Reproduce

  1. Upgrade @stencil/core to version 4.19.2
  2. Attempt imports moduleNameMapper from @stencil/core/testing/jest-preset
  3. Observe the mentioned error

Code Reproduction URL

n/a

Additional Information

Error: Cannot find module
@tc/stencil-library:build:            '/Users/xxxx/Documents/work/cars/node_modules/@stencil/core/testing/jest-preset' at
@ionitron-bot ionitron-bot bot added the triage label Jul 15, 2024
@christian-bromann
Copy link
Member

@geovanesantana would @stencil/core/testing/jest-preset.js work?

@christian-bromann christian-bromann added Awaiting Reply This PR or Issue needs a reply from the original reporter. and removed triage labels Jul 15, 2024
@geovanesantana
Copy link
Author

geovanesantana commented Jul 18, 2024

Hey @christian-bromann,
Thanks for the help! It seems to work but I'm still getting some errors in other imports from @stencil/core, I'll check and get back with feedback.

@ionitron-bot ionitron-bot bot removed the Awaiting Reply This PR or Issue needs a reply from the original reporter. label Jul 18, 2024
@christian-bromann christian-bromann added the Bug: Validated This PR or Issue is verified to be a bug within Stencil label Jul 18, 2024
@christian-bromann
Copy link
Member

christian-bromann commented Jul 18, 2024

Thanks for validating @geovanesantana , I've raised a PR #5900 to fix the regression we've introduced.

@mattclough1
Copy link

Noticing the same thing with importing @stencil/core/compiler. I'm fixing currently by importing @stencil/core/compiler/stencil.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug: Validated This PR or Issue is verified to be a bug within Stencil
Projects
None yet
3 participants