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
Where dist/zone.js
?
Issue Analytics
- State:
- Created 3 years ago
- Reactions:7
- Comments:13 (4 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This issue proves that angular is not a enterprise ready solution!
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 yourpackage.json
and even if you should have build tests before every deployment. 🤦🏼