NPM publish an angular library Error [How to Solve]

Error Messages:

ERROR: Trying to publish a package that has been compiled by Ivy in full compilation mode. This is not allowed.
Please delete and rebuild the package with Ivy partial compilation mode, before attempting to publish.


This is because I was previously building my Angular library in development mode: the

Replace with the following production model.

ng build my-lib –configuration production

After that the error disappears.

Read More: