Cannot find @sentry/angular-ivy
module in Jest tests when using Angular 17.x
#9628
Closed
3 tasks done
Labels
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/angular-ivy
SDK Version
7.81.1
Framework Version
17.0.4
Link to Sentry event
No response
SDK Setup
No response
Steps to Reproduce
We are using
@angular-builders/jest
to run our tests via Jest (the problem surfaces with default configuration).Steps to reproduce:
@angular-builders/jest
following readmeExpected Result
Jest tests continue to work without a problem.
Actual Result
Every test fails that references a file that imports Sentry in any way with the following message:
I think the root cause of this problem is the same as reported in this issue:
Jest encountered an unexpected token
in Angular #9448Tests will start to work again when I revert back the referenced change by adding the
main
entry point in thenode_modules
folder:There is a workaround. The following snippet should be added to the Jest config:
This mandatory workaround should be possibly documented somewhere prominent.
The text was updated successfully, but these errors were encountered: