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]: can't access lexical declaration 'zone_1' before initialization #2901

Open
BojanKogoj opened this issue Dec 18, 2024 · 2 comments
Open

Comments

@BojanKogoj
Copy link

Version

14.4.2

Steps to reproduce

https://stackblitz.com/edit/stackblitz-starters-t9yu2zeb?file=setup-jest.ts
Run npm i --legacy-peer-deps && npm run test

Expected behavior

Test to run

Actual behavior

❯ npm run test

test
jest

FAIL src/example.component.spec.ts
● Test suite failed to run

can't access lexical declaration 'zone_1' before initialization

  _execModule@file:///home/projects/stackblitz-starters-t9yu2zeb/node_modules/jest-runtime/build/index.js#cjs:1439:24
  _loadModule@file:///home/projects/stackblitz-starters-t9yu2zeb/node_modules/jest-runtime/build/index.js#cjs:1022:12
  requireModule@file:///home/projects/stackblitz-starters-t9yu2zeb/node_modules/jest-runtime/build/index.js#cjs:882:12
  jestAdapter@file:///home/projects/stackblitz-starters-t9yu2zeb/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js#cjs:70:15

Additional context

No response

Environment

System:
    OS: Linux 5.0 undefined
    CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
  Binaries:
    Node: 18.20.3 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.2.3 - /usr/local/bin/npm
    pnpm: 8.15.6 - /usr/local/bin/pnpm
  npmPackages:
    jest: ^29.7.0 => 29.7.0
@BojanKogoj
Copy link
Author

I've tried pretty much the same configuration locally (not on StackBlitz) and it works well.

@ahnpnl
Copy link
Collaborator

ahnpnl commented Dec 18, 2024

I think probably the StackBlitz issue with dependencies installation?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants