Cannot create production build
maphi88 opened this issue · 0 comments
I had clone your project and created an application which works fine on my local server but everytime i run npm build:prod It throws the following error.
ERROR in ./src/ngfactory lazy
Module not found: Error: Can't resolve '/Applications/XAMPP/xamppfiles/htdocs/ng-universal-demo/src/ngfactory/app/listing/module/editorial.module.ngfactory.ts' in '/Applications/XAMPP/xamppfiles/htdocs/ng-universal-demo/src/ngfactory'
@ ./src/ngfactory lazy
@ ./~/@angular/core/@angular/core.es5.js
@ ./src/main.server.aot.ts
Node version - v6.10.2
Npm version - 5.3.0
My package.json is
{
"name": "ng-universal-demo",
"version": "1.0.0",
"main": "index.js",
"repository": {},
"scripts": {
"start": "npm run build && npm run server",
"build": "webpack",
"build:aot": "webpack --env.aot --env.client & webpack --env.aot --env.server",
"build:prod": "webpack --env.aot --env.client -p & webpack --env.aot --env.server",
"prebuild": "npm run clean",
"prebuild:aot": "npm run clean",
"prebuild:prod": "npm run clean",
"clean": "rimraf dist",
"server": "nodemon dist/server.js",
"watch": "webpack --watch"
},
"engines": {
"node": ">=6.0.0"
},
"license": "MIT",
"dependencies": {
"@angular/animations": "^4.0.0",
"@angular/common": "^4.0.0",
"@angular/compiler": "^4.0.0",
"@angular/core": "^4.0.0",
"@angular/forms": "^4.0.0",
"@angular/http": "^4.0.0",
"@angular/platform-browser": "^4.0.0",
"@angular/platform-browser-dynamic": "^4.0.0",
"@angular/platform-server": "^4.0.0",
"@angular/router": "^4.0.0",
"@nguniversal/express-engine": "^1.0.0-beta.0",
"angular-2-local-storage": "^1.0.1",
"express": "^4.15.2",
"ng2-img-cropper": "^0.9.0",
"ngx-cookie-service": "^1.0.7",
"rxjs": "^5.3.0",
"xhr2": "^0.1.4",
"zone.js": "^0.8.8"
},
"devDependencies": {
"@angular/cli": "^1.2.6",
"@angular/compiler-cli": "^4.0.0",
"@ngtools/webpack": "^1.2.14",
"@types/express": "^4.0.35",
"@types/node": "^7.0.8",
"html-webpack-plugin": "^2.28.0",
"nodemon": "^1.11.0",
"raw-loader": "^0.5.1",
"rimraf": "^2.6.1",
"script-ext-html-webpack-plugin": "^1.7.1",
"typescript": "^2.2.1",
"webpack": "^2.2.1",
"webpack-merge": "^4.0.0"
}
}