Covalent: error when compiling with ivy ngcc

Created on 21 Jun 2019  路  10Comments  路  Source: Teradata/covalent

Error with ivy compiling

Bug Report

When enabling ivy in tsconfig using "enableIvy": true then an error occurs with covalent.

ERROR in Tried to overwrite /Users/Dev/project/node_modules/@covalent/core/common/forms/auto-trim/auto-trim.directive.d.ts.__ivy_ngcc_bak
  with an ngcc back up file, which is disallowed.

We tried that on different systems (win, osx, ubuntu), tried to reinstall modules, delete node_modules then reinstalling modules with the same error.

Removing our components using @covalent/core and then recompiling works perfectly. Covalent is now the only package preventing us to use ivy.

What is the expected behavior?

Covalent should support ivy compilation with ngcc

What is the motivation / use case for changing the behavior?

Which version of Angular and Material, and which browser and OS does this issue affect?

angular 8.0.1
angular material 8.0.1
@covalent/core 2.02

Most helpful comment

This is still an issue for me as well. I've set up a library project per Angular specifications and still no go. I can see that the library project builds just fine with enableIvy: false but whenever I run ng serve on the demo project it then creates a bunch of the .__ivy_ngcc_bak files inside the dist/library-project. It seems to work for the first save but then it starts spitting out the .__ivy_ngcc_bak with an ngcc back up file, which is disallowed. error. Has anyone had any luck with this?

I'm running Angular 10.1.1

All 10 comments

Ivy support is on our roadmap. It can be tracked here: #1402
Also, just changing "enableIvy": true won't work, it will be supported once we upgrade to angular 8.0.

Ivy support is on our roadmap. It can be tracked here: #1402
Also, just changing "enableIvy": true won't work, it will be supported once we upgrade to angular 8.0.

I still got this issue on Angular 8.0.0 So Do we have any solution for this now?

The main issue is that covalent wasnt compiled in angular 8 i assume.

We are going to release one last 2.X release next week and quickly follow up with a 3.0.0-beta.0 with angular 8 upgrade/build.. when we do this we will focus on making sure ivy works and everything it entails.

Closing as duplicate of #1402

Any solutions for that?

Thanks!

delete all the .__ivy_ngcc_bak file in node_modules folder and delete __ivy_ngcc__ folder may resolve it.

I found - that you should follow closely the project layout for angular libraries to be sure that you don't compile your library as ivy.
there is an intricate well thought out layout of tsconfig files that mesh with the angular.json so it does it right. If you transpile ivy into your dist you'll get nailed by this.

This is still an issue for me as well. I've set up a library project per Angular specifications and still no go. I can see that the library project builds just fine with enableIvy: false but whenever I run ng serve on the demo project it then creates a bunch of the .__ivy_ngcc_bak files inside the dist/library-project. It seems to work for the first save but then it starts spitting out the .__ivy_ngcc_bak with an ngcc back up file, which is disallowed. error. Has anyone had any luck with this?

I'm running Angular 10.1.1

just the same. cant serve demo with library project

I was having the same issue when using angular library liked with npm link
I was using --prod in my build command for the library
removing --prod as suggested here
fixed the issue

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fxstein picture fxstein  路  5Comments

d3viant0ne picture d3viant0ne  路  3Comments

iceman3000 picture iceman3000  路  4Comments

ineselmufti picture ineselmufti  路  4Comments

dbettini picture dbettini  路  4Comments