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]: v13 example is not working because main-ngcc.js is not exported #1163

Closed
mircowidmer opened this issue Nov 10, 2021 · 1 comment
Closed
Labels
Not An Issue Not jest-preset-angular issue

Comments

@mircowidmer
Copy link

Version

10.1.0

Steps to reproduce

  1. git clone https://github.com/thymikee/jest-preset-angular
  2. cd jest-preset-angular/examples/example-app-v13
  3. npm install(with node 16.10)
  4. npm run test

Expected behavior

I expect to see successfully executed tests with jest.

Actual behavior

ngcc-jest-processor: running ngcc
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './ngcc/main-ngcc.js' is not defined by "exports" in /jest-preset-angular/examples/example-app-v13/node_modules/@angular/compiler-cli/package.json
    at new NodeError (node:internal/errors:371:5)
    at throwExportsNotFound (node:internal/modules/esm/resolve:440:9)
    at packageExportsResolve (node:internal/modules/esm/resolve:692:3)
    at resolveExports (node:internal/modules/cjs/loader:482:36)
    at Function.Module._findPath (node:internal/modules/cjs/loader:522:31)
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:919:27)
    at Function.resolve (node:internal/modules/cjs/helpers:108:19)
    at Object.<anonymous> (/Users/mirco/Downloads/jest-preset-angular/examples/example-app-v13/node_modules/jest-preset-angular/build/utils/ngcc-jest-processor.js:22:21)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)

Additional context

I am aware of angular/components#23907 and #1149 (comment)

Environment

MacOS Monterey, node 16.10
@ahnpnl
Copy link
Collaborator

ahnpnl commented Nov 10, 2021

This has been resolved for next tag. You can try out next tag or wait until an official release.

@ahnpnl ahnpnl closed this as completed Nov 10, 2021
@ahnpnl ahnpnl added Not An Issue Not jest-preset-angular issue and removed Bug Report Needs Triage labels Nov 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Not An Issue Not jest-preset-angular issue
Projects
None yet
Development

No branches or pull requests

2 participants