• Register
0 votes
329 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 52 views
52 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 15 views
15 views
Problem: error typeerror: cannot read property 'length' of undefined
asked Feb 18 Ethan ross 2.7k points
1 vote
1 answer 2 views
2 views
Problem : When i use this cmd ng build --prod : I am getting: 10% building modules 4/6 modules 2 active ...ules\bootstrap\dist\css\bootstrap.cssNode#moveTo was deprecated. Use Container#append. Date: 2018-01-23T06:19:48.732Z Hash: 34c92447878ca7d7b148 Time: 150966ms chunk { ... [rendered] chunk {3} inline.676417dc826d752b57e1.bundle.js (inline) 1.45 kB [entry] [rendered] i didn't get a solution .
asked Apr 7 Shovo210 14k points
0 votes
1 answer 43 views
43 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 16.2k points
0 votes
1 answer 3 views
3 views
Problem: I need someone&rsquo;s assistance to solve my problem .. react module not found: can't resolve
asked Apr 7 Ifra 24.4k points
0 votes
1 answer 691 views
691 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
1 answer 1 view
1 view
Problem : I'm using Angular version 2.0.0-rc.4. I added the following property to my systemjs.config.js map object in my Angular 2 app: '@angular/http': 'https://npmcdn.com/@angular/http' When I ctrl-click on the url it attempts to download a js file. However ... '@angular/http'.`" Is there an additional step that I'm missing in order for this module to be recognized and usable by my angular app?
asked Apr 7 Shovo210 14k points
0 votes
1 answer 5 views
5 views
Problem: The error is continuously showing in my script.How to solve this error: cannot find module '@angular-devkit/core'?
asked Apr 3 ashik 12.9k points
1 vote
2 answers 598 views
598 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 2 views
2 views
Problem: Please help me &hellip; how can I solve it? How to create a component in angular?
asked Apr 7 Ifra 24.4k points