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.

[PR WELCOME] Angular package format 5: Metadata version mismatch

See original GitHub issue

Type of Issue

This is not a real bug/feature, but I want to show that libs built with Angular package format 5 (ng-packgr 2.0.0-rc.4) don’t compile with Angular 4 + AOT. When you try to build your project with Angular 4 and AOT you’ll get this error: Angular package format 5: Error: Metadata version mismatch for module "..." found version 4, expected 3

However, both Angular 4 (only JIT, but not AOT) and Angular 5 will work without problems.

This could be a problem, because If you have a library you cannot remove Angular 4 support today.

Version Information

ng-packagr: v2.0.0-rc.4
node: v8.9.0
@angular: v4.4.6
rxjs: latest version
zone.js: latest version

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
dhergescommented, Dec 1, 2017

It’s not really deprecated. It’s just an “older” version which you can keep using.

If you go dual-support different Angular versions, you also likely have support branches like version/4.x, version/5.x, master, and so on. If you do so, I’d keep on the version/4.x the 1.x dependency and on version/5.x the 2.x (rcs).

At most, we can print an error message or fail the build, when compilation encounters Angular 4 sources.

0reactions
github-actions[bot]commented, Aug 10, 2021

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

This action has been performed automatically by a bot.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Metadata version mismatch with Angular 4 - Stack Overflow
So I ran the prefixer tool and it automatically takes me to material 5 version. I have this type mismatch error. Finally, my...
Read more >
Angular package format
This document describes the Angular Package Format (APF). APF is an Angular specific specification for the structure and format of npm packages that...
Read more >
Teradata/covalent - Gitter
Hi guys, i just updated my angular, material and covalent to latest version. Now i keep getting this error. Can anybody help?
Read more >
Nixpkgs 22.11 manual - NixOS
The Nix Packages collection (Nixpkgs) is a set of thousands of packages for the Nix package ... The metadata should match the format...
Read more >
Solving error mismatch beetwen Angular versions - Medium
The other solution knew is change version number of metadata files from 4 to 3 in the packages compiled with Angular 5+. RepairMismatch...
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