1

I have migrated my code from angular 13 to 14 and I'm trying to build and publish it my private repo.

All my testcases are passing after the migration

Also tried the following, ng build <package/framework> --configuration production

Build is successful but when It comes to publish below error is displayed.

node --eval "console.error('ERROR: Trying to publish a package that has been compiled by Ivy in full compilation mode. This is not allowed.\nPlease delete and rebuild the package with Ivy partial compilation mode, before attempting to publish.\n')" && exit 1

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.

I couldn't find any similar issues wrt angular 14.

up6616
  • 105
  • 1
  • 11
  • Hello, did you manage tu publish in Full Ivy compilation mode ? Do you know what cause this error ? The private repo ? Npm version ? – Deunz May 16 '23 at 07:22

2 Answers2

1

I tried adding "angularCompilerOptions": { "enableIvy": true, "compilationMode": "partial" } part of my packages started working but some of my components still have circular dependency issue, which is again a different topic.

up6616
  • 105
  • 1
  • 11
0

=== 2023 UPDATE (work with ANGULAR 15) ===

To fix the problem edit projects/your-library-name/tsconfig.lib.prod.json

replace:

...
"angularCompilerOptions": {
    "enableIvy": false
  }
...

by:

...
"angularCompilerOptions": {
    "compilationMode": "partial"
  }
...
Alaindeseine
  • 3,260
  • 1
  • 11
  • 21