• Register
0 votes
258 views

Problem :

I face this following error after upgrading my angular-cli

​ERROR in Template parse errors:

Can't bind to 'index' since it isn't a known property of 'tag'. ("own)="handleKeydown($event, item)"

             (onTagEdited)="onTagEdited.emit(item)"

             [ERROR ->][index]="i"

             [attr.tabindex]="readonly ? -1 : 0"

             [class.readonly]="readonly""): TagInputComponent@16:13

ERROR in ./src/main.ts

Module not found: Error: Can't resolve './$$_gendir/app/app.module.ngfactory' in 'D:\xxxx\yyyy\eeeee\eeee\src'

 @ ./src/main.ts 5:0-74

 @ multi ./src/main.ts



​

Above error happens only when I run the ng build --prod and works fine when I run the ng build without the parameters

7 5 2
3,870 points

Please log in or register to answer this question.

1 Answer

0 votes

Solution :

When you run a ng build in the angular 2, latest angular-cli automatically runs with --aot parameter (ahead of a time compilation), so it is trying to optimize the code. You are having the package which is not yet compatible for the optimizing. So you need to update the packages. Most probably your packages that has **forRoot()** in the app.module.ts

I recommend you to update all packages.

Easy way to update your package is to use the ncu npm package as in below,

Install it:

npm install -g npm-check-updates

Use it:

ncu for the display

ncu -u for the re-writing your package.json

and run npm install to update the packages

If above did not work, for you then you might need to update your code for aot compliance.

9 7 4
38,600 points

Related questions

1 vote
1 answer 40 views
40 views
Problem: I have gained fundamental knowledge on Angular2. I am taking help of online tutorials to learn Angular2. I am trying to create the angular 2 App with the angular cli I have written below command in my cmd: npm install angular-cli -g After above command I am ... an error . I am unable to debug above error. I need Angular2 expert who can help me in fixing above Angular2 error for me.
asked Jun 5, 2020 Martin K 6.6k points
0 votes
1 answer 11 views
11 views
Problem: I am working on a Laravel 5.3 project. When I run the command gulpin CMD I get error messages. Can anyone tell me how I can get the result without errors? <strong> gulpfile.js var elixir = require('laravel-elixir'); require('laravel-elixir-vue'); elixir(function(mix) { mix.sass('app.scss') ... "vue-resource": "^0.9.3" }, "dependencies": { "admin-lte": "^2.3.7", "node-sass": "^3.13.0" } }
asked Dec 6, 2020 sasha 5.3k points
0 votes
1 answer 275 views
275 views
Problem: I was trying to start the ionic 3 but if I try to run the command 'ionic cordova run android' then I was facing below error. I tried many ways to fix this problem but I was unable to fix it: > cordova run android [13:30:46]  lint finished ... are my System details: Node       : v6.11.0 OS         : Windows 7 Xcode      : not installed ios-deploy : not installed ios-sim    : not installed
asked Aug 15, 2020 Raphael Pacheco 4.9k points
1 vote
2 answers 377 views
377 views
Problem : I am very new to Ionic, I have recently started working on Ionic but I am facing below error: Runtime Error Uncaught (in promise): Error: Module build failed: Error: ENOENT: no such file or directory, open '/Users/stewart/Development/ionic/theWhoZoo/src/pages ... say they do match. import { MyRatingModel } from '../model/myratingModel'; How can I fix above error need Ionic expert help.
asked Apr 22, 2020 stewart 4k points
0 votes
1 answer 661 views
661 views
Problem: I am facing following error if I tried to use a MatToolBar in my angular app. In browser I receive: Uncaught TypeError: Object(...) is not a function I also receive below warnings in my console: WARNING in ./node_modules/@angular/cdk/esm5/text-field.es5.js ... /cdk/esm5/a11y.es5.js 2324:206-214 "export 'ɵɵinject' was not found in '@angular/core' Kindly guide me in resolving above errors.
asked Aug 18, 2020 Raphael Pacheco 4.9k points
0 votes
1 answer 15 views
15 views
Problem: So I have an MVC application where I am trying to send an email from an Angular form running on a DotNet server. The main problem I see is that when I call the service from my Angular component, it returns 404 (URL not found maybe). Now I have a message in my controller that ...         }     } } Now I can't figure out why it can't talk to the controller. Is there something I am missing?
asked Dec 7, 2020 sasha 5.3k points
0 votes
1 answer 55 views
55 views
Problem: I have already cloned my old project and then executed npm install and after that I also run ionic serve But unfortunately I came across below ionic error: [ERROR] @ionic/app-scripts is required for ionic serve to work properly. Looks like @ionic/app-scripts isn't installed in this project. This package is required for ionic serve in ionic/angular 4 projects.
asked Aug 6, 2020 Raphael Pacheco 4.9k points
0 votes
1 answer 2.4K views
2.4K views
Problem: I am beginner to Angular. I have recently started working in Angular project but I am facing below bizarre error: &ldquo;Can't bind to 'ngIf' since it isn't a known property of 'div'.&rdquo; The element is I guess <div [ngIf]="isAuth" id="sidebar ... is the child component. In my parent component i.e. App component the ngif works properly. Please Note: I am currently using Angular RC5.
asked Aug 17, 2020 Raphael Pacheco 4.9k points
1 vote
1 answer 186 views
186 views
Problem : I am very new to Angular2. Currently I am trying to create the component after that it is set to the root component but still I am facing below error: Template parse errors: Can't bind to 'routerLink' since it isn't a known property of 'a'. I ... days on researching and trying to fix above error but unable to fix it so now I need Angular2 experts advice to quick fix my Angular2 error.
asked May 2, 2020 stewart 4k points