71 questions
1
vote
0
answers
62
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
902
views
Angular compiler-cli error: Namespace 'ts' has no exported member 'ResolutionMode'
I am developing a web application with Angular 16 in Webstorm. The web application is currently pre-release and only has a small portion of minimum functionality completed. I was editing with ng ...
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 ...
4
votes
3
answers
2k
views
Cannot read property 'text' of undefined at NodeObject.getText at getRequiredModulePath
Error occurs while generating browser application bundles (phase: setup).
What can cause this error?
Info from console:
Generating browser application bundles (phase: setup)...
TypeError: Cannot read ...
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\...
19
votes
4
answers
26k
views
Angular 11 - ng serve - Option "sourceMap" is deprecated
I updated Angular project from Angular 10 to 11x. Everything works normally, except for one warning on running project using ng serve (without any option in ng serve). The warning is:
Option "...
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 ...
0
votes
3
answers
6k
views
Getting "An unhandled exception occurred: Cannot find module '@angular/compiler-cli' when trying to run "ng serve"
[enter image description here][1]
[1]: https://i.sstatic.net/axbtO.png
Getting "An unhandled exception occurred: Cannot find module '@angular/compiler-cli' when trying to run "ng serve"
...
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"
...
},
...
4
votes
1
answer
3k
views
How to fix Angular 11 'Option "progress" is deprecated'? [closed]
I'm missing the percentage progress view while compiling an Angular 11. Usually I did:
ng serve
and saw a progress in percent while the code was compiled. Now that percentage view is gone and it's ...
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 ...
-2
votes
1
answer
545
views
Angular 8 compile Issue
I have a problem compiling my Angular 8 application:
chunk {main} main.js, main.js.map (main) 11.7 kB [initial] [rendered]
chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 141 kB [initial] ...
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
vote
0
answers
193
views
Angular 9: failed to build an angular library in v9.1.0 which dependes on other angular library
I'm upgrading my Angular library to version 9, in my project I use Angular v9.1.0.
And my library relies on another internal Angular library. When I try to build my library, II got the following ...
-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?
0
votes
2
answers
186
views
Error thrown during publishing dotnet core app
I'm trying to publish a dotnet core 2.2 app with angular.
During the publishing I get following error:
Version of @angular/compiler-cli needs to be 2.3.1 or greater. Current version is "7.2.15"
I'...
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
338
views
Angular 6, ngc, AOT, Angular Router, router.ngfactory and SystemJS
I have a simple angular 6 application I am trying to get compiled with AOT. I am NOT using the Angular CLI. I have a custom generator that scaffolds my project start and scaffolds my components, ...
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 {
@...
0
votes
1
answer
71
views
Angular5 app conditionally load script and styling according to component
My angular application consist of 2 parts based on public and private pages:
1- Landing Page (Before Login)
2- Dashbaord and other Pages (For Authorized User)
Landing page component contain signup/...
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 ....
1
vote
2
answers
717
views
How to package a lazy loaded module following the Angular Package Format specification?
I am packaging my angular module using ngc and rollup following the Angular Package Format 4.0 specification.
I'm able to lazy load it using the angular cli using a wrapper module.
import { ...
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: ...
5
votes
2
answers
3k
views
AOT compiler - include lazy loaded external module
I am trying to include external module (hosted in git/npm repository) as lazy-loaded module in my Angular application.
I am compiling my external module with ngc compiler:
node_modules/.bin/ngc -p ...
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 ...
3
votes
1
answer
3k
views
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)??
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
940
views
angular/compiler-cli package was not properly installed
I am new in angular 2 and i have downloaded Angular2 project from server and try to run in my local environment after installing npm but it is showing the below error:
The "@angular/compiler-cli&...
1
vote
0
answers
857
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: ...
0
votes
0
answers
599
views
Angular AOT & Rollup [!] Error: Unexpected token
I'm following https://angular.io/guide/aot-compiler tutorial, everything goes fine till rollup section.
When i run:
"node_modules/.bin/rollup" -c rollup-config.js
I get those errors:
The following ...
-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
259
views
How to deal with a npm package whose AOT compilation fails
I am a complete newbee to web development, and now I am facing a problem that I do not know how to deal with.
I am using the npm package named @uniprank/ngx-file-uploader (https://www.npmjs.com/...
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 ...
0
votes
0
answers
53
views
Angular2 compiler turns module 'x' into 'x/index'
I'm having a hard time to understand why @angular compiler changes my modules names:
directive.ts
import isNil from 'lodash-es/isNil';
...
@Directive({
selector: '[aColor]',
})
export class ...
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\...
5
votes
1
answer
2k
views
What is the purpose of *.ngsummary.json
I've just learning about AOT, ngc etc. After running ngc I see plenty of *.ngsummary.json (in src folder, next to *.ts files).
What are they for?
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 ...
2
votes
1
answer
180
views
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. ...
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
1k
views
AOT - loading error app.module.ngfactory is not found
I'm trying to integrate AOT in my angular project so I followed Angular.io to do that, the AOT folder and files are generated successfully with no errors after I run the following command :
"...
0
votes
1
answer
543
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, ...
0
votes
1
answer
146
views
AOT Compilation error in angular library
I Made a library for Angular 2 but I am stuck in this issue.
I am getting this error:
ERROR in C:/xampp/htdocs/github/jw-bootstrap-switch-ng2/switch-project/src/$$_gendir/node_modules/jw-bootstrap-...
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 ...
16
votes
2
answers
3k
views
Angular 4 AOT compiler does not support mixins
Sometimes I use Mixins to inject repeated functions like slugUrl().
But it doesn't work with angular 4 compiler.
export function Mixin(decorators: Function[]) {
return function (classFn: Function) ...
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('...
1
vote
1
answer
686
views
Using my module in angular-cli: Error encountered resolving symbol values statically
I know I'm not the only one having questions regarding this term. But the angular guys have about 23 questions regarding this term. I tried a lot of different things. One is important: I tried it the ...
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 ...
2
votes
0
answers
740
views
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 ...
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! {"...
1
vote
1
answer
531
views
Error upgrading Rollup build to latest @angular/2.4.8
I'm running into an error with Rollup after compiling my Angular 2 app with ngc. Has anyone else overcome this issue?
Error: '$$observable' is not exported by node_modules/rxjs/symbol/observable.js
...