Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't resolve '@angular/router.ngfactory #359

Closed
2 tasks
redoc123 opened this issue Aug 13, 2018 · 3 comments
Closed
2 tasks

Can't resolve '@angular/router.ngfactory #359

redoc123 opened this issue Aug 13, 2018 · 3 comments

Comments

@redoc123
Copy link

redoc123 commented Aug 13, 2018

I'm submitting a...

  • [x ] Bug report
  • Feature request
  • Documentation issue or request

Current behavior

I am getting the following exception when i run.
./src/app/app.module.ngfactory.js
Module not found: Error: Can't resolve '@angular/router.ngfactory' in '/src/app'

Expected behavior

There should nt be error.

Minimal reproduction of the problem with instructions

==Remove all traces of QuoteService from the generated applications

modified: src/app/home/home.component.html
modified: src/app/home/home.component.spec.ts
modified: src/app/home/home.component.ts
modified: src/app/home/home.module.ts
deleted: src/app/home/quote.service.spec.ts
deleted: src/app/home/quote.service.ts

Environment

- generator version: 5.0.1
- node version: v8.9.4
- npm version: 5.6.0
- OS:  Mac OSX

Others:

@sinedied
Copy link
Member

Duplicate of #352 , see #352 (comment) and #352 (comment).

TL;DR: Latest @angular/cli release is buggy, remove the --aot flag from the start script in your package.json script as a temporary workaround 😞

@artuska
Copy link

artuska commented Feb 20, 2019

Issue still exists.

Angular CLI: 7.3.2
Node: 10.0.0
OS: darwin x64
Angular: 7.2.5
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.13.2
@angular-devkit/build-angular     0.13.2
@angular-devkit/build-optimizer   0.13.2
@angular-devkit/build-webpack     0.13.2
@angular-devkit/core              7.3.2
@angular-devkit/schematics        7.3.2
@angular/cli                      7.3.2
@ngtools/webpack                  7.3.2
@schematics/angular               7.3.2
@schematics/update                0.13.2
rxjs                              6.4.0
typescript                        3.2.4
webpack                           4.29.0

@ImATechnophile
Copy link

Issue fixed:
Just update your cli and core to the latest version.
ng update @angular/cli
ng update @angular/core

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants