ngrev icon indicating copy to clipboard operation
ngrev copied to clipboard

Error parsing project

Open sebastien-sebops opened this issue 6 years ago • 8 comments
trafficstars

Hi,

I've got the following issue :

Cannot parse your project. Make sure it's compatible with the Angular's AoT compiler. Error during parsing:

Users/xxxxxx/front-end/src/app/core/core.routing.ts(11,5): Error during template compile of 'CoreRoutingModule'
  Reference to a local (non-exported) symbols are not supported in decorators but 'routes' was referenced
    Consider exporting 'routes'.

But the AOT compilation is fine. We are using Angular 8.2. I'm using the latest version of ngrev available for OSX (0.0.27)

Here is tsconfig file and the core.routing file. (file renamed with txt extension for GitHub support)

tsconfig.txt core.routing.txt

sebastien-sebops avatar Aug 16 '19 11:08 sebastien-sebops

Requesting to provide solution for the issue. I am also getting same

kiranmate avatar Sep 06 '19 05:09 kiranmate

I've just stumbled across this on a project we recently upgraded.

Error during template compile of 'AppRoutingModule;
Function expressions are not supported in decorators in 'routes'
Consider changing the function expression into an exported function

It looks to be where we have started using the () => import('../app/') syntax for lazy loading modules.

AndrewAllison avatar Sep 09 '19 06:09 AndrewAllison

I've just stumbled across this on a project we recently upgraded.

Error during template compile of 'AppRoutingModule;
Function expressions are not supported in decorators in 'routes'
Consider changing the function expression into an exported function

It looks to be where we have started using the () => import('../app/') syntax for lazy loading modules.

I can confirm the link between this usage and the issue.

sebastien-sebops avatar Sep 09 '19 07:09 sebastien-sebops

Here's https://github.com/mgechev/ngrev/issues/58 as a reference.

In the post version 9 release ngrev will not be functional for certain period of time. It'll require rewrite of the parsing library ngast. It's not yet clear when I'll be able to prioritize it.

mgechev avatar Sep 09 '19 14:09 mgechev

Any update on this issue? Would love to use this project but we have an Angular 9 project and the same error above.

Neuroforge avatar May 09 '20 13:05 Neuroforge

Got a pretty same error : [Window Title] Error

[Main Instruction] Error while parsing project

[Content] Cannot parse your project. Make sure it's compatible with the Angular's AoT compiler. Error during parsing:

Could not resolve module @angular/core

My project is on angular 10.

evan-boissonnot avatar Nov 17 '20 09:11 evan-boissonnot

https://github.com/mgechev/ngrev/issues/57#issuecomment-529498333

This is still relevant. If anyone has the bandwidth to migrate the project to the latest version to ngast, I'd be more than happy to help.

Until then, I'll lock the thread since the problem is in the lack of Ivy support.

mgechev avatar Nov 20 '20 14:11 mgechev

Some good news. Over the past few days I've been working on Ivy support. You can find it here. It's still not trivial to get the app up and running, but make sure you follow this issue for updates.

mgechev avatar Dec 30 '20 23:12 mgechev