question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot find module 'zone.js/dist/zone.js' after upgrade to zone.js 0.11.0

See original GitHub issue

🐞 bug report

Affected Package

The issue is caused by package zone.js

Is this a regression?

Yes

Description

https://github.com/thymikee/jest-preset-angular/issues/445

FAIL  file-size.pipe.spec.ts
  ● Test suite failed to run

    Cannot find module 'zone.js/dist/zone.js' from '../../../../../node_modules/jest-preset-angular/build/setupJest.js'

    Require stack:
      /node_modules/jest-preset-angular/build/setupJest.js
      /node_modules/jest-preset-angular/index.js
      src/stubs/setupJest.ts

      at Resolver.resolveModule (../../../../../node_modules/jest-resolve/build/index.js:307:11)

🌍 Your Environment

Angular Version:


Yarn 1.26
Angular 9
Jest 26
jest-preset-angular 8

After install zone.js I am open node_modules

image

image

Where dist/zone.js?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:7
  • Comments:13 (4 by maintainers)

github_iconTop GitHub Comments

11reactions
AliMDcommented, Aug 19, 2020

This issue proves that angular is not a enterprise ready solution!

3reactions
muuvmuuvcommented, Aug 19, 2020

It is… Idk how your production deployments look like but I can think of no developer that has NEVER break something on releases. Things happen and you can never test everything. Besides that this issue did not break any production pipeline unless you have used zone.js: "*" in your package.json and even if you should have build tests before every deployment. 🤦🏼

Read more comments on GitHub >

github_iconTop Results From Across the Web

zone.js - npm
Implements Zones for JavaScript, inspired by Dart. If you're using zone.js via unpkg (i.e. using https://unpkg.com/zone.js ) and you're ...
Read more >
Ask Question - Stack Overflow
I fixed it in my project with this command: npm install zone.js@0.11.3 --save. I was getting this error using zone.js@0.8.29 .
Read more >
jest cannot find module - Brand Content Institute
Create-React-App with Jest not working “Cannot find module nodeModuleX from componentY” 0. In my case I think is related to the building SO...
Read more >
module not found: error: can't resolve 'os' in - You.com
This will add those node.js polyfills you're probably missing. ... node_modules/zone.js/dist/zone-mix.js Module not found: Error: Can't resolve 'fs' in ...
Read more >
Untitled
[0.11.1](https://github.com/angular/angular/compare/zone.js-0.11.0...zone.js-0.11.1) ... by `Angular CLI` to import like so: ``` import 'zone.js/dist/zone'; ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found