71 questions
1
vote
0
answers
59
views
Error `compiler_1.createR3ProviderExpression is not a function` in Angular
Generating browser application bundles (phase: setup)...Compiling @angular/core : es2015 as esm2015
Compiling @angular/animations : es2015 as esm2015
Error: Error on worker #1: TypeError: compiler_1....
0
votes
1
answer
5k
views
angular/compiler-cli peer dependencies
I've tried a lot to fix this problem, but I can't find any solution.
This is the error:
npm ERR! While resolving: @angular-devkit/[email protected]
npm ERR! Found: @angular/[email protected]
npm ...
6
votes
2
answers
11k
views
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\...
2
votes
0
answers
339
views
Properly preprocess Angular Components and Templates
We just recently ported an Angular Project from angular 1.5 to 11.
A part of the code was conditionally compiled with gulp-preprocess and conditional statements in code and templates (different parts ...
12
votes
1
answer
14k
views
'ngcc' not recognized as internal or external command
Running command npm run ngcc throws the error 'ngcc' is not recognized as an internal or external command.
package.json
{
"scripts": {
"ngcc": "ngcc"
...
},
...
3
votes
0
answers
1k
views
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 ...
0
votes
1
answer
3k
views
Issue with installing angular compiler
I have been spending hours trying to figure out what is wrong with trying to run an angular based project.
node version: v12.16.1
In my project directory I did npm install -g @angular/[email protected]
...
-1
votes
1
answer
150
views
How know if the Angular compiled /dist match with the source code in /src?
I have a compiled 'dist' folder and I want to know if it matches with the source code or is a different version. How can I do it?
3
votes
0
answers
673
views
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/...
0
votes
1
answer
3k
views
Angular component input static typing
I have 2 angular components.
ButtonComponent that has an input of type ButtonText
@Component({
selector: 'app-button',
template: '<h1></h1>',
})
export class ButtonComponent {
@...
1
vote
1
answer
1k
views
Angular - How to import a scss variable file using ngc -w?
I've got a FooComponent that has a .scss file attached to it, this works.
However, when trying to import a variable file from an external lib residing in node_modules, it throws an error.
In my ....
8
votes
1
answer
6k
views
How to retrieve a component's metadata in Angular
An Angular component has decorators:
@Component({ ... })
export class MyAngularComponent {
@Input() myInputParam: MyType;
@Input() myOtherInputParam: MyOtherType;
@Output() myOutputParam: ...
96
votes
5
answers
18k
views
What does the angular compiler "compile"?
I was asked that today and was not able to give a proper answer.
Typescript transpiles to JS. Then there is tree shaking, "less" (optional) and what else in the process of making a deployment. But ...
2
votes
2
answers
3k
views
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): ...
1
vote
0
answers
854
views
SystemJS Error with Angular AOT: Uncaught (in promise): TypeError: ctor is not a constructor
I'm using Angular 4.4.1 + SystemJS 0.20.19 + NgBootstrap 1.0.0-beta.5 in an app. The app works in Angular JIT mode by following this instructions and having the following SystemJS configuration
meta: ...
-1
votes
3
answers
2k
views
The "@angular/compiler-cli" package was not properly installed. Error: Cannot find module '@angular/compiler-cli'
When trying npm start or ng serve it shows the error like this :
The "@angular/compiler-cli" package was not properly installed. Error: Error: Cannot find module '@angular/compiler-cli'
Error: ...
0
votes
1
answer
875
views
Angular-compiler outputs script that contain undefined this
I'm working on a small npm package for Angular, which is basically one directive that enables dragging/moving on the element you put it on. I did manage to publish it yesterday (even thought it took a ...
1
vote
0
answers
372
views
Angular 2/4 compile using AoT error - extendStatics
I have an application which I'm trying to compile using AoT. When I build the application I'm getting the following error:
C:\test\node_modules\@angular\compiler-cli\src\diagnostics\...
4
votes
2
answers
2k
views
Angular AOT Compiler - TypeError: this.compiler.analyzeModulesAsync is not a function
I'm trying to follow the ahead of time (AOT) compiler instructions here:
https://angular.io/guide/aot-compiler
The project I'm working on has been developed using the quickstart seed, as described ...
1
vote
0
answers
1k
views
Angular 4 startup performance
We have Angular 4 project compiled aot and bundled with rollup and without lazy loading. It takes about 3 seconds for scripting during startup. I need to reduce this time. I found examples of Angular ...
0
votes
1
answer
536
views
Dynamically loading a component in Angular 2 requires Traceur?
My code should load a component based on a customer name and a setting, both received as strings from the backend.
I tried using the Compiler to compile the module and then get the component factory, ...
2
votes
2
answers
2k
views
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 ...
5
votes
2
answers
2k
views
window is undefined when used as useValue provider with Angular 4 AoT
When Angular 4.0.2 application is compiled ahead-of-time, and the provider is defined as useValue
import { OpaqueToken, Provider } from '@angular/core';
export const windowToken = new OpaqueToken('...
4
votes
0
answers
641
views
Generated files in angular2 AoT compilation
I'm using angular-cli to build an app.
The build runs fine with the --aot=false option.
I get errors with --aot=true, and to investigate these I'd like to look at the files generated by the ...
1
vote
1
answer
236
views
Angular AOT compilation error : Internal state: StaticSymbols in summaries can't have members
We are trying to perform ahead of time ( aot ) compilation for our angular 2 project and we are running into a error :
Error: Internal state: StaticSymbols in summaries can't have members! {"...