ERROR in ./ClientApp/boot.browser.ts Module not found: Error: Can't resolve './app/app.browser.module.ngfactory'

192 views
Skip to first unread message

MAZEN ALDUBAI

unread,
Jan 2, 2018, 3:38:39 AM1/2/18
to Angular and AngularJS discussion
I am using an asp.net core 2.0 angular template. while deployment I get the following error message when executing the command "webpack --env.prod", I would appreciate any help with this problem.

Package.json:
{
  "name": "Webportal",
  "private": true,
  "version": "0.0.0",
  "scripts": {
    "test": "karma start ClientApp/test/karma.conf.js"
  },
  "dependencies": {
    "@angular/animations": "^5.1.2",
    "@angular/cdk": "^5.0.2",
    "@angular/common": "^5.1.2",
    "@angular/compiler": "^5.1.2",
    "@angular/core": "^5.1.2",
    "@angular/forms": "^5.1.2",
    "@angular/http": "^5.1.2",
    "@angular/material": "5.0.2",
    "@angular/platform-browser": "^5.1.2",
    "@angular/platform-browser-dynamic": "^5.1.2",
    "@angular/platform-server": "^5.1.2",
    "@angular/router": "^5.1.2",
    "@types/webpack-env": "^1.13.3",
    "angular-font-awesome": "3.1.1",
    "angular2-jwt": "^0.2.3",
    "angular2-template-loader": "0.6.2",
    "aspnet-prerendering": "^3.0.1",
    "aspnet-webpack": "^2.0.1",
    "awesome-typescript-loader": "3.4.1",
    "bootstrap": "3.3.7",
    "css": "2.2.1",
    "css-loader": "0.28.7",
    "enhanced-resolve": "3.3.0",
    "es6-shim": "0.35.3",
    "event-source-polyfill": "0.0.12",
    "expose-loader": "0.7.4",
    "extract-text-webpack-plugin": "3.0.2",
    "file-loader": "1.1.6",
    "font-awesome": "4.7.0",
    "hammerjs": "^2.0.8",
    "html-loader": "0.5.1",
    "isomorphic-fetch": "2.2.1",
    "jquery": "3.2.1",
    "json-loader": "0.5.7",
    "jwthelper": "0.0.4",
    "ng2-image-gallery": "^0.3.18",
    "ngx-gallery": "^4.1.2",
    "ngx-logger": "^1.0.0",
    "npm-check-updates": "^2.14.0",
    "preboot": "6.0.0-beta.1",
    "raw-loader": "0.5.1",
    "reflect-metadata": "0.1.10",
    "rxjs": "^5.5.6",
    "style-loader": "0.19.1",
    "to-string-loader": "1.1.5",
    "url-loader": "0.6.2",
    "web-animations-js": "^2.3.1",
    "webpack-hot-middleware": "2.21.0",
    "webpack-merge": "4.1.1",
    "zone.js": "0.8.19"
  },
  "devDependencies": {
    "@angular/cli": "1.6.3",
    "@angular/compiler-cli": "5.1.2",
    "@ngtools/webpack": "1.9.3",
    "@types/chai": "4.0.10",
    "@types/jasmine": "2.8.3",
    "chai": "4.1.2",
    "jasmine-core": "2.8.0",
    "karma": "2.0.0",
    "karma-chai": "0.1.0",
    "karma-chrome-launcher": "2.2.0",
    "karma-cli": "1.0.1",
    "karma-jasmine": "1.1.1",
    "karma-webpack": "2.0.9",
    "source-map-support": "^0.5.0",
    "typescript": "2.6.2",
    "webpack": "3.10.0"
  }
}

MAZEN ALDUBAI

unread,
Jan 2, 2018, 3:38:39 AM1/2/18
to Angular and AngularJS discussion
I am using an asp.net core 2.0 angular template. while deployment I get the following error message when executing the command "webpack --env.prod", I would your help with this problem.

Sander Elias

unread,
Jan 2, 2018, 4:18:19 AM1/2/18
to Angular and AngularJS discussion
Mi Mazen,

What version of angular are you using? It looks like it that the template you are using is having an issue. I see you are using the CLI too, why are you building with webpack instead?

Regards
Sander
Reply all
Reply to author
Forward
0 new messages