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.

Angular no longer directly depends on core-js - should not be a peerDependency

See original GitHub issue

Hi there.

https://github.com/angular/angular-cli/blob/master/packages/schematics/angular/workspace/files/package.json.template#L22-L24

Currently, Angular CLI does not require core-js and is not installed. On the other hand, jest-preset-angular has peerDependencies dependencies in core-js.

It seems to me that we will be forced to do unnecessary installations and should be removed dependencies on core-js. Thanks.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
wthocommented, May 15, 2019

According to the commit message https://github.com/angular/angular-cli/commit/a0a583adaaf8e739c375b914f249801660f33334, the “Angular Build System takes care of the dependencies”.

As jest does not use the Angular Build System and requires some library to reflect the metadata in the decorators, my first suggestion would be to make it a dependency.

Do you know how Angular handles the reflection lib? Does it install it on-demand at the first build? Does Angular offer to use other libraries than core-js?

0reactions
wthocommented, Oct 18, 2019

Solved in #315

Read more comments on GitHub >

github_iconTop Results From Across the Web

npm WARN deprecated core-js@2.6.11: core-js@<3 is no ...
I'm getting below error while creating a new Angular application -. npm WARN deprecated core-js@2.6 ...
Read more >
Difference between dependencies, devDependencies and ...
npm gives a warning message whenever there is a peer Dependency and these are different dependencies compared to the above-discussed ...
Read more >
Real-World Angular Ivy Upgrade (v9-next) - Medium
Peer dependency warnings when installing dependencies means that those dependencies might not work correctly together. You can use the '--force' ...
Read more >
Is this a dependency or devDependency? - With Blue Ink
The reason is that when someone installs your package from NPM, they will install all of its dependencies, but not the devDependencies.
Read more >
@angular-devkit/build-angular | Yarn - Package Manager
and maintain Angular applications directly from a command shell. ... ccc8e0350, fix, display actionable error when a style does not exist in Karma...
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