Skip to content
This repository was archived by the owner on Aug 7, 2021. It is now read-only.
This repository was archived by the owner on Aug 7, 2021. It is now read-only.

module not found: '@angular/router.ngfactory' when use 'tns run android --bundle --env.aot --env.uglify' #630

@miroslavaivanova

Description

@miroslavaivanova

Tell us about the problem

  1. tns create app --ng
  2. npm i nativescript-dev-webpack --save-dev
  3. npm i nativescript-dev-typescript --save-dev
  4. tns run android --bundle --env.aot --env.uglify
  5. try to make a change in app/item/item.service.ts
    the following exception will throw:
ERROR in ./app.module.ngfactory.js
Module not found: Error: Can't resolve '@angular/router.ngfactory' in '/Users/user/angApp1/app'
 @ ./app.module.ngfactory.js 10:0-111 10:0-111 27:0-48 49:211-244
 @ ./main.aot.ts

Local environment

  • [x ] NativeScript CLI version : 4.2.0

Project data

"dependencies": {
    "@angular/animations": "~6.1.0",
    "@angular/common": "~6.1.0",
    "@angular/compiler": "~6.1.0",
    "@angular/core": "~6.1.0",
    "@angular/forms": "~6.1.0",
    "@angular/http": "~6.1.0",
    "@angular/platform-browser": "~6.1.0",
    "@angular/platform-browser-dynamic": "~6.1.0",
    "@angular/router": "~6.1.0",
    "nativescript-angular": "~6.1.0",
    "nativescript-theme-core": "~1.0.4",
    "reflect-metadata": "~0.1.8",
    "rxjs": "^6.0.0",
    "tns-core-modules": "~4.2.0",
    "zone.js": "^0.8.26"
  },
  "devDependencies": {
    "@angular/compiler-cli": "~6.1.0",
    "@ngtools/webpack": "~6.1.0",
    "nativescript-dev-typescript": "^0.7.2",
    "nativescript-dev-webpack": "^0.15.1",
    "typescript": "~2.7.2"
  }, 

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions