Questions tagged [angular-compiler-cli]
71 questions
3
votes
0 answers
How to use file replacements in Angular 10
I am working on a project, and as far as I can tell; when running "ng run build --prod" the file replacements are not working.
This is important as I want to remove the NgRx devtools when putting the application into production. Otherwise it runs…

codeThinker123
- 664
- 1
- 6
- 16
3
votes
0 answers
No NgModule metadata found for 'AppModule' in Angular 7
Intro
I am trying to create my own custom platform for use in Angular 7. The basic idea is to provide a platform for rendering into a terminal. Here's where I currently am:
The Code
platform-console/console-renderer.ts
(based more or less on…

night_owl
- 856
- 6
- 12
3
votes
1 answer
Angular AoT angular compiler cli vs angular-cli
what is the difference between this guide https://angular.io/guide/aot-compiler that use @angular/compiler-cli and using command ng build --prod (that use options --aot)??

Nuovo 001
- 275
- 1
- 5
- 12
3
votes
1 answer
TypeError: Angular2 AoT Compilation Error: createAotCompiler is not a function
I am trying to follow the AOT compilation guide on the angular.io site but when I execute the command shown below,
"node_modules/.bin/ngc" -p tsconfig-aot.json
I get the error
TypeError: compiler.createAotCompiler is not a function
at…

Bruce Bigirwenkya
- 63
- 6
3
votes
1 answer
ngc looking in wrong directory
I have installed the @angular/compiler-cli globally and added the following tsconfig-aot.json to my client directory:
{
"compilerOptions": {
"target": "es5",
"module": "es2015",
"moduleResolution": "node",
"sourceMap": true,
…

George Edwards
- 8,979
- 20
- 78
- 161
3
votes
1 answer
Angular 2: How to implement lazy routing with Ahead of Time Compilation?
I have successfully created .ngfactory files using ngc compiler and have also updated my main.ts with "platformBrowser().bootstrapModuleFactory(AppModuleNgFactory)".
app.routes.ts
const appRoutes: Routes = [
{ path: '', loadChildren:…

Manul Aggarwal
- 29
- 5
2
votes
1 answer
Enable debug logs in `ng build`
How do I enable debug logs in ng build ? I want to see what the basePath is. The snippet below is from program_based_entry_point_finder.js.
node_modules\@angular\compiler-cli\ngcc\src\entry_point_finder\program_based_entry_point_finder.js
…

ShaggyInjun
- 2,880
- 2
- 31
- 52
2
votes
2 answers
Missing parameter(s): email, password error is occurring on posting data in angular4?
I am new to angular 4. I am working on login page in which I have to post the user information on login.But I am getting error as
"code":"rest_missing_callback_param","message":"Missing parameter(s): email, password" on posting data.Below is my…

srujana
- 433
- 1
- 10
- 33
2
votes
1 answer
TsickleCompilerHost gives error when running ngc on Angular4 library
I'm currently working on exporting an Angular 4 component library in the format described by the Angular Package Format. To simplify this, I generated a default setup using this Yeoman generator. Everything worked perfectly at first and I could…

Kaj Nelissen
- 915
- 10
- 29
2
votes
2 answers
Angular Compiler throws Internal error: unknown identifier {}
I am constructing my angular2 services like so
import { OpaqueToken, ClassProvider } from "@angular/core";
export interface IService {
// ... interface declaration
}
export class Service implements IService {
// ... implementation…

David Brem
- 504
- 2
- 6
- 16
2
votes
0 answers
How to debug build.js generated from AOT compiled, rolled up angular application
I have angular 2 application that works beautifully when JIT compiled. Now for Prod, I am using AOT compilation and rollup create a single bundle file. When I run the application, I get this error in the console of Chrome dev tools
Error: Uncaught…

Shilpa Nagavara
- 1,055
- 2
- 16
- 31
2
votes
2 answers
Angular2: generate metadata.json and ngsummary.json
Dear Angular 2 developpers,
I am struggling with finding decent documentation on the angular 2 compiler (ngc).
What I want to do: I have a folder containing an angular 2 logging library whose entry point is a 'logging.module.ts'. So far, I have…

David Brem
- 504
- 2
- 6
- 16
2
votes
0 answers
ng-xi18n throws exception for using full path in templateUrl
I have components where I use full path in templateUrl
@Component({
templateUrl: 'app/components/controls/checkbox/checkbox.html'
})
I am aware that I can use moduleId: module.id, but I want to keep full path to html file for my deployment…

Bahodir
- 539
- 1
- 9
- 29
2
votes
2 answers
Angular2 AOT for dynamic HTML
I have dynamic HTML in Angular2 app using Angular2-Component-Outlet and it works. But now when I am trying to create AOT, I still need to load the RuntimeCompiler for Angular2-Component-Outlet.
Is there any way to also AOT compile the dynamic HTML…

Avinash Tiwari
- 135
- 1
- 10
2
votes
2 answers
Angular AOT failing at compilation (something with angular/compiler-cli)
After going through the AOT tutorial on the Docs page, I am trying to compile angular 2 AOT and am getting the following error
"node_modules/.bin/ngc" -p tsconfig-aot.json
TypeError: compiler.AnimationParser is not a constructor
at…

Kevin Quiring
- 639
- 1
- 11
- 26