ng build --prod --aot not working in Angular 6Integrate materialize in a Angular2 project with webpack and SCSSError while trying to integrate materialize for Angular 2ERROR in ./src/styles.scss Module build failed: Error: Unclosed comment when angular ng build --prodAngular cli load script on demandAngular 6 and karma 'Can not load “@angular-devkit/build-angular”, it is not registered'ngx-translate: messages take too long to be displayedUnable to reorder columns in angular ngx-datatableAngular build produce invalid folder pathImplementing emailjs package with angular 7 doesnt work
Can a police officer film me on their personal device in my own home?
Does a centaur PC also count as being mounted?
What are good ways to spray paint a QR code on a footpath?
How would a order of Monks that renounce their names communicate effectively?
What speedlites can work with the Canon EOS 4000D's non-standard hotshoe?
How can I check type T is among parameter pack Ts... in C++?
Do sudoku answers always have a single minimal clue set?
How should I behave to assure my friends that I am not after their money?
Spicket or spigot?
The use of "I" and "we" used in the same sentence and other questions
Row to remove the dotted white border around focused button text
Should I include salary information on my CV?
How do I spend money in Sweden and Denmark?
Three column layout
When is it ok to add filler to a story?
When to apply Lorentz transformations and laws of time dilations and length contractions: explanations
Transitive action of a discrete group on a compact space
MH370 blackbox - is it still possible to retrieve data from it?
Should I hide continue button until tasks are completed?
Wilcoxon signed rank test – critical value for n>50
Why do I have to press the shutter button twice on my Canon 6d Mark II?
Symbol for "not absolutely continuous" in Latex
Why won't the ground take my seed?
How well known and how commonly used was Huffman coding in 1979?
ng build --prod --aot not working in Angular 6
Integrate materialize in a Angular2 project with webpack and SCSSError while trying to integrate materialize for Angular 2ERROR in ./src/styles.scss Module build failed: Error: Unclosed comment when angular ng build --prodAngular cli load script on demandAngular 6 and karma 'Can not load “@angular-devkit/build-angular”, it is not registered'ngx-translate: messages take too long to be displayedUnable to reorder columns in angular ngx-datatableAngular build produce invalid folder pathImplementing emailjs package with angular 7 doesnt work
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
Here is my local Angular version details.
Angular CLI: 6.1.5
Node: 10.15.1
OS: darwin x64
Angular: 6.1.6
I'm trying to deploy the production code in the server using the below command.
ng build --prod --aot
I'm getting a dist folder with all the files. But when I upload the code in the server. It still shows Angular is running in the development code.
Here is my angular.json
file.
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects":
"matngular":
"root": "",
"sourceRoot": "src",
"projectType": "application",
"architect":
"build":
"builder": "@angular-devkit/build-angular:browser",
"options":
"outputPath": "dist",
"index": "src/index.html",
"main": "src/main.ts",
"tsConfig": "src/tsconfig.app.json",
"polyfills": "src/polyfills.ts",
"assets": [
"src/assets",
"src/favicon.ico",
"src/homepage.html",
"src/login.html",
"src/register.html",
"src/forgot-password.html",
],
"styles": [
"src/assets/css/prism.min.css",
"node_modules/sweetalert2/dist/sweetalert2.min.css",
"src/assets/css/wizard.css",
"src/assets/css/quill.snow.css",
"src/assets/css/quill.bubble.css",
"src/assets/css/hopscotch.css",
"node_modules/nouislider/distribute/nouislider.min.css",
"node_modules/angular-calendar/scss/angular-calendar.scss",
"node_modules/dragula/dist/dragula.css",
"node_modules/ngx-toastr/toastr.css",
"node_modules/videogular2/fonts/videogular.css",
"node_modules/@swimlane/ngx-datatable/release/index.css",
"node_modules/@swimlane/ngx-datatable/release/assets/icons.css",
"src/assets/css/demo.css",
"src/assets/sass/app.scss",
"src/styles.css"
],
"scripts": [
"node_modules/jquery/dist/jquery.min.js",
"src/assets/vendor/pace/pace.min.js",
"src/assets/js/perfect-scrollbar.jquery.min.js"
]
,
"configurations":
"production":
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"fileReplacements": [
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
]
,
"serve":
"builder": "@angular-devkit/build-angular:dev-server",
"options":
"browserTarget": "matngular:build",
"sslKey": "/server.key",
"sslCert": "/server.crt",
,
"configurations":
"production":
"browserTarget": "matngular:build:production"
,
"extract-i18n":
"builder": "@angular-devkit/build-angular:extract-i18n",
"options":
"browserTarget": "matngular:build"
,
"test":
"builder": "@angular-devkit/build-angular:karma",
"options":
"main": "src/test.ts",
"karmaConfig": "./karma.conf.js",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json",
"scripts": [
"node_modules/jquery/dist/jquery.min.js",
"src/assets/vendor/pace/pace.min.js",
"src/assets/js/perfect-scrollbar.jquery.min.js"
],
"styles": [
"src/assets/css/prism.min.css",
"node_modules/sweetalert2/dist/sweetalert2.min.css",
"src/assets/css/wizard.css",
"src/assets/css/quill.snow.css",
"src/assets/css/quill.bubble.css",
"src/assets/css/hopscotch.css",
"node_modules/ng2-toastr/bundles/ng2-toastr.min.css",
"node_modules/nouislider/distribute/nouislider.min.css",
"node_modules/angular-calendar/scss/angular-calendar.scss",
"node_modules/dragula/dist/dragula.css",
"node_modules/videogular2/fonts/videogular.css",
"node_modules/@swimlane/ngx-datatable/release/index.css",
"node_modules/@swimlane/ngx-datatable/release/assets/icons.css",
"src/assets/css/demo.css",
"src/assets/sass/app.scss",
"src/styles.css"
],
"assets": [
"src/assets",
"src/favicon.ico"
]
,
"lint":
"builder": "@angular-devkit/build-angular:tslint",
"options":
"tsConfig": [
"src/tsconfig.app.json",
"src/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**/*"
]
,
"matngular-e2e":
"root": "",
"sourceRoot": "",
"projectType": "application",
"architect":
"e2e":
"builder": "@angular-devkit/build-angular:protractor",
"options":
"protractorConfig": "./protractor.conf.js",
"devServerTarget": "matngular:serve"
,
"lint":
"builder": "@angular-devkit/build-angular:tslint",
"options":
"tsConfig": [
"e2e/tsconfig.e2e.json"
],
"exclude": [
"**/node_modules/**/*"
]
,
"defaultProject": "matngular",
"schematics":
"@schematics/angular:component":
"prefix": "app",
"styleext": "scss"
,
"@schematics/angular:directive":
"prefix": "app"
Is there any other way to build the app and upload for production?
I have 2 files in environments folder
environment.prod.ts
environment.ts
Here is environment.prod.ts
file
export const environment =
production: true,
baseUrl: 'https://app.website.com/api',
domain: 'https://app.website.com'
;
Here is environment.ts
file
export const environment =
production: true,
baseUrl: 'https://localhost:4200/api',
domain: 'https://localhost:4200'
;
When I run it in the server, localhost urls are called instead of website urls.
angular deployment build
|
show 2 more comments
Here is my local Angular version details.
Angular CLI: 6.1.5
Node: 10.15.1
OS: darwin x64
Angular: 6.1.6
I'm trying to deploy the production code in the server using the below command.
ng build --prod --aot
I'm getting a dist folder with all the files. But when I upload the code in the server. It still shows Angular is running in the development code.
Here is my angular.json
file.
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects":
"matngular":
"root": "",
"sourceRoot": "src",
"projectType": "application",
"architect":
"build":
"builder": "@angular-devkit/build-angular:browser",
"options":
"outputPath": "dist",
"index": "src/index.html",
"main": "src/main.ts",
"tsConfig": "src/tsconfig.app.json",
"polyfills": "src/polyfills.ts",
"assets": [
"src/assets",
"src/favicon.ico",
"src/homepage.html",
"src/login.html",
"src/register.html",
"src/forgot-password.html",
],
"styles": [
"src/assets/css/prism.min.css",
"node_modules/sweetalert2/dist/sweetalert2.min.css",
"src/assets/css/wizard.css",
"src/assets/css/quill.snow.css",
"src/assets/css/quill.bubble.css",
"src/assets/css/hopscotch.css",
"node_modules/nouislider/distribute/nouislider.min.css",
"node_modules/angular-calendar/scss/angular-calendar.scss",
"node_modules/dragula/dist/dragula.css",
"node_modules/ngx-toastr/toastr.css",
"node_modules/videogular2/fonts/videogular.css",
"node_modules/@swimlane/ngx-datatable/release/index.css",
"node_modules/@swimlane/ngx-datatable/release/assets/icons.css",
"src/assets/css/demo.css",
"src/assets/sass/app.scss",
"src/styles.css"
],
"scripts": [
"node_modules/jquery/dist/jquery.min.js",
"src/assets/vendor/pace/pace.min.js",
"src/assets/js/perfect-scrollbar.jquery.min.js"
]
,
"configurations":
"production":
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"fileReplacements": [
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
]
,
"serve":
"builder": "@angular-devkit/build-angular:dev-server",
"options":
"browserTarget": "matngular:build",
"sslKey": "/server.key",
"sslCert": "/server.crt",
,
"configurations":
"production":
"browserTarget": "matngular:build:production"
,
"extract-i18n":
"builder": "@angular-devkit/build-angular:extract-i18n",
"options":
"browserTarget": "matngular:build"
,
"test":
"builder": "@angular-devkit/build-angular:karma",
"options":
"main": "src/test.ts",
"karmaConfig": "./karma.conf.js",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json",
"scripts": [
"node_modules/jquery/dist/jquery.min.js",
"src/assets/vendor/pace/pace.min.js",
"src/assets/js/perfect-scrollbar.jquery.min.js"
],
"styles": [
"src/assets/css/prism.min.css",
"node_modules/sweetalert2/dist/sweetalert2.min.css",
"src/assets/css/wizard.css",
"src/assets/css/quill.snow.css",
"src/assets/css/quill.bubble.css",
"src/assets/css/hopscotch.css",
"node_modules/ng2-toastr/bundles/ng2-toastr.min.css",
"node_modules/nouislider/distribute/nouislider.min.css",
"node_modules/angular-calendar/scss/angular-calendar.scss",
"node_modules/dragula/dist/dragula.css",
"node_modules/videogular2/fonts/videogular.css",
"node_modules/@swimlane/ngx-datatable/release/index.css",
"node_modules/@swimlane/ngx-datatable/release/assets/icons.css",
"src/assets/css/demo.css",
"src/assets/sass/app.scss",
"src/styles.css"
],
"assets": [
"src/assets",
"src/favicon.ico"
]
,
"lint":
"builder": "@angular-devkit/build-angular:tslint",
"options":
"tsConfig": [
"src/tsconfig.app.json",
"src/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**/*"
]
,
"matngular-e2e":
"root": "",
"sourceRoot": "",
"projectType": "application",
"architect":
"e2e":
"builder": "@angular-devkit/build-angular:protractor",
"options":
"protractorConfig": "./protractor.conf.js",
"devServerTarget": "matngular:serve"
,
"lint":
"builder": "@angular-devkit/build-angular:tslint",
"options":
"tsConfig": [
"e2e/tsconfig.e2e.json"
],
"exclude": [
"**/node_modules/**/*"
]
,
"defaultProject": "matngular",
"schematics":
"@schematics/angular:component":
"prefix": "app",
"styleext": "scss"
,
"@schematics/angular:directive":
"prefix": "app"
Is there any other way to build the app and upload for production?
I have 2 files in environments folder
environment.prod.ts
environment.ts
Here is environment.prod.ts
file
export const environment =
production: true,
baseUrl: 'https://app.website.com/api',
domain: 'https://app.website.com'
;
Here is environment.ts
file
export const environment =
production: true,
baseUrl: 'https://localhost:4200/api',
domain: 'https://localhost:4200'
;
When I run it in the server, localhost urls are called instead of website urls.
angular deployment build
It still shows Angular is running in the development code. What does that mean?
– JB Nizet
Mar 25 at 12:05
1
may be issue is with yourenvironment.prod.ts
file. add yourproduction
configuration in this file.
– Farhat Zaman
Mar 25 at 12:06
can you post yourenvironment.prod.ts
?
– ForestG
Mar 25 at 12:07
Updated Code @ForestG. Please check it now.
– Anirudh
Mar 25 at 12:11
Your files, the configuration and the cli command are all correct. I suggest you try a different application server, to see if your app get's deployed. I usually test with http-server, can you check it out and see if it serves your application in prod mode?
– ForestG
Mar 25 at 12:15
|
show 2 more comments
Here is my local Angular version details.
Angular CLI: 6.1.5
Node: 10.15.1
OS: darwin x64
Angular: 6.1.6
I'm trying to deploy the production code in the server using the below command.
ng build --prod --aot
I'm getting a dist folder with all the files. But when I upload the code in the server. It still shows Angular is running in the development code.
Here is my angular.json
file.
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects":
"matngular":
"root": "",
"sourceRoot": "src",
"projectType": "application",
"architect":
"build":
"builder": "@angular-devkit/build-angular:browser",
"options":
"outputPath": "dist",
"index": "src/index.html",
"main": "src/main.ts",
"tsConfig": "src/tsconfig.app.json",
"polyfills": "src/polyfills.ts",
"assets": [
"src/assets",
"src/favicon.ico",
"src/homepage.html",
"src/login.html",
"src/register.html",
"src/forgot-password.html",
],
"styles": [
"src/assets/css/prism.min.css",
"node_modules/sweetalert2/dist/sweetalert2.min.css",
"src/assets/css/wizard.css",
"src/assets/css/quill.snow.css",
"src/assets/css/quill.bubble.css",
"src/assets/css/hopscotch.css",
"node_modules/nouislider/distribute/nouislider.min.css",
"node_modules/angular-calendar/scss/angular-calendar.scss",
"node_modules/dragula/dist/dragula.css",
"node_modules/ngx-toastr/toastr.css",
"node_modules/videogular2/fonts/videogular.css",
"node_modules/@swimlane/ngx-datatable/release/index.css",
"node_modules/@swimlane/ngx-datatable/release/assets/icons.css",
"src/assets/css/demo.css",
"src/assets/sass/app.scss",
"src/styles.css"
],
"scripts": [
"node_modules/jquery/dist/jquery.min.js",
"src/assets/vendor/pace/pace.min.js",
"src/assets/js/perfect-scrollbar.jquery.min.js"
]
,
"configurations":
"production":
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"fileReplacements": [
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
]
,
"serve":
"builder": "@angular-devkit/build-angular:dev-server",
"options":
"browserTarget": "matngular:build",
"sslKey": "/server.key",
"sslCert": "/server.crt",
,
"configurations":
"production":
"browserTarget": "matngular:build:production"
,
"extract-i18n":
"builder": "@angular-devkit/build-angular:extract-i18n",
"options":
"browserTarget": "matngular:build"
,
"test":
"builder": "@angular-devkit/build-angular:karma",
"options":
"main": "src/test.ts",
"karmaConfig": "./karma.conf.js",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json",
"scripts": [
"node_modules/jquery/dist/jquery.min.js",
"src/assets/vendor/pace/pace.min.js",
"src/assets/js/perfect-scrollbar.jquery.min.js"
],
"styles": [
"src/assets/css/prism.min.css",
"node_modules/sweetalert2/dist/sweetalert2.min.css",
"src/assets/css/wizard.css",
"src/assets/css/quill.snow.css",
"src/assets/css/quill.bubble.css",
"src/assets/css/hopscotch.css",
"node_modules/ng2-toastr/bundles/ng2-toastr.min.css",
"node_modules/nouislider/distribute/nouislider.min.css",
"node_modules/angular-calendar/scss/angular-calendar.scss",
"node_modules/dragula/dist/dragula.css",
"node_modules/videogular2/fonts/videogular.css",
"node_modules/@swimlane/ngx-datatable/release/index.css",
"node_modules/@swimlane/ngx-datatable/release/assets/icons.css",
"src/assets/css/demo.css",
"src/assets/sass/app.scss",
"src/styles.css"
],
"assets": [
"src/assets",
"src/favicon.ico"
]
,
"lint":
"builder": "@angular-devkit/build-angular:tslint",
"options":
"tsConfig": [
"src/tsconfig.app.json",
"src/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**/*"
]
,
"matngular-e2e":
"root": "",
"sourceRoot": "",
"projectType": "application",
"architect":
"e2e":
"builder": "@angular-devkit/build-angular:protractor",
"options":
"protractorConfig": "./protractor.conf.js",
"devServerTarget": "matngular:serve"
,
"lint":
"builder": "@angular-devkit/build-angular:tslint",
"options":
"tsConfig": [
"e2e/tsconfig.e2e.json"
],
"exclude": [
"**/node_modules/**/*"
]
,
"defaultProject": "matngular",
"schematics":
"@schematics/angular:component":
"prefix": "app",
"styleext": "scss"
,
"@schematics/angular:directive":
"prefix": "app"
Is there any other way to build the app and upload for production?
I have 2 files in environments folder
environment.prod.ts
environment.ts
Here is environment.prod.ts
file
export const environment =
production: true,
baseUrl: 'https://app.website.com/api',
domain: 'https://app.website.com'
;
Here is environment.ts
file
export const environment =
production: true,
baseUrl: 'https://localhost:4200/api',
domain: 'https://localhost:4200'
;
When I run it in the server, localhost urls are called instead of website urls.
angular deployment build
Here is my local Angular version details.
Angular CLI: 6.1.5
Node: 10.15.1
OS: darwin x64
Angular: 6.1.6
I'm trying to deploy the production code in the server using the below command.
ng build --prod --aot
I'm getting a dist folder with all the files. But when I upload the code in the server. It still shows Angular is running in the development code.
Here is my angular.json
file.
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects":
"matngular":
"root": "",
"sourceRoot": "src",
"projectType": "application",
"architect":
"build":
"builder": "@angular-devkit/build-angular:browser",
"options":
"outputPath": "dist",
"index": "src/index.html",
"main": "src/main.ts",
"tsConfig": "src/tsconfig.app.json",
"polyfills": "src/polyfills.ts",
"assets": [
"src/assets",
"src/favicon.ico",
"src/homepage.html",
"src/login.html",
"src/register.html",
"src/forgot-password.html",
],
"styles": [
"src/assets/css/prism.min.css",
"node_modules/sweetalert2/dist/sweetalert2.min.css",
"src/assets/css/wizard.css",
"src/assets/css/quill.snow.css",
"src/assets/css/quill.bubble.css",
"src/assets/css/hopscotch.css",
"node_modules/nouislider/distribute/nouislider.min.css",
"node_modules/angular-calendar/scss/angular-calendar.scss",
"node_modules/dragula/dist/dragula.css",
"node_modules/ngx-toastr/toastr.css",
"node_modules/videogular2/fonts/videogular.css",
"node_modules/@swimlane/ngx-datatable/release/index.css",
"node_modules/@swimlane/ngx-datatable/release/assets/icons.css",
"src/assets/css/demo.css",
"src/assets/sass/app.scss",
"src/styles.css"
],
"scripts": [
"node_modules/jquery/dist/jquery.min.js",
"src/assets/vendor/pace/pace.min.js",
"src/assets/js/perfect-scrollbar.jquery.min.js"
]
,
"configurations":
"production":
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"fileReplacements": [
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
]
,
"serve":
"builder": "@angular-devkit/build-angular:dev-server",
"options":
"browserTarget": "matngular:build",
"sslKey": "/server.key",
"sslCert": "/server.crt",
,
"configurations":
"production":
"browserTarget": "matngular:build:production"
,
"extract-i18n":
"builder": "@angular-devkit/build-angular:extract-i18n",
"options":
"browserTarget": "matngular:build"
,
"test":
"builder": "@angular-devkit/build-angular:karma",
"options":
"main": "src/test.ts",
"karmaConfig": "./karma.conf.js",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json",
"scripts": [
"node_modules/jquery/dist/jquery.min.js",
"src/assets/vendor/pace/pace.min.js",
"src/assets/js/perfect-scrollbar.jquery.min.js"
],
"styles": [
"src/assets/css/prism.min.css",
"node_modules/sweetalert2/dist/sweetalert2.min.css",
"src/assets/css/wizard.css",
"src/assets/css/quill.snow.css",
"src/assets/css/quill.bubble.css",
"src/assets/css/hopscotch.css",
"node_modules/ng2-toastr/bundles/ng2-toastr.min.css",
"node_modules/nouislider/distribute/nouislider.min.css",
"node_modules/angular-calendar/scss/angular-calendar.scss",
"node_modules/dragula/dist/dragula.css",
"node_modules/videogular2/fonts/videogular.css",
"node_modules/@swimlane/ngx-datatable/release/index.css",
"node_modules/@swimlane/ngx-datatable/release/assets/icons.css",
"src/assets/css/demo.css",
"src/assets/sass/app.scss",
"src/styles.css"
],
"assets": [
"src/assets",
"src/favicon.ico"
]
,
"lint":
"builder": "@angular-devkit/build-angular:tslint",
"options":
"tsConfig": [
"src/tsconfig.app.json",
"src/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**/*"
]
,
"matngular-e2e":
"root": "",
"sourceRoot": "",
"projectType": "application",
"architect":
"e2e":
"builder": "@angular-devkit/build-angular:protractor",
"options":
"protractorConfig": "./protractor.conf.js",
"devServerTarget": "matngular:serve"
,
"lint":
"builder": "@angular-devkit/build-angular:tslint",
"options":
"tsConfig": [
"e2e/tsconfig.e2e.json"
],
"exclude": [
"**/node_modules/**/*"
]
,
"defaultProject": "matngular",
"schematics":
"@schematics/angular:component":
"prefix": "app",
"styleext": "scss"
,
"@schematics/angular:directive":
"prefix": "app"
Is there any other way to build the app and upload for production?
I have 2 files in environments folder
environment.prod.ts
environment.ts
Here is environment.prod.ts
file
export const environment =
production: true,
baseUrl: 'https://app.website.com/api',
domain: 'https://app.website.com'
;
Here is environment.ts
file
export const environment =
production: true,
baseUrl: 'https://localhost:4200/api',
domain: 'https://localhost:4200'
;
When I run it in the server, localhost urls are called instead of website urls.
angular deployment build
angular deployment build
edited Mar 25 at 12:10
Anirudh
asked Mar 25 at 12:03
AnirudhAnirudh
5594 gold badges23 silver badges56 bronze badges
5594 gold badges23 silver badges56 bronze badges
It still shows Angular is running in the development code. What does that mean?
– JB Nizet
Mar 25 at 12:05
1
may be issue is with yourenvironment.prod.ts
file. add yourproduction
configuration in this file.
– Farhat Zaman
Mar 25 at 12:06
can you post yourenvironment.prod.ts
?
– ForestG
Mar 25 at 12:07
Updated Code @ForestG. Please check it now.
– Anirudh
Mar 25 at 12:11
Your files, the configuration and the cli command are all correct. I suggest you try a different application server, to see if your app get's deployed. I usually test with http-server, can you check it out and see if it serves your application in prod mode?
– ForestG
Mar 25 at 12:15
|
show 2 more comments
It still shows Angular is running in the development code. What does that mean?
– JB Nizet
Mar 25 at 12:05
1
may be issue is with yourenvironment.prod.ts
file. add yourproduction
configuration in this file.
– Farhat Zaman
Mar 25 at 12:06
can you post yourenvironment.prod.ts
?
– ForestG
Mar 25 at 12:07
Updated Code @ForestG. Please check it now.
– Anirudh
Mar 25 at 12:11
Your files, the configuration and the cli command are all correct. I suggest you try a different application server, to see if your app get's deployed. I usually test with http-server, can you check it out and see if it serves your application in prod mode?
– ForestG
Mar 25 at 12:15
It still shows Angular is running in the development code. What does that mean?
– JB Nizet
Mar 25 at 12:05
It still shows Angular is running in the development code. What does that mean?
– JB Nizet
Mar 25 at 12:05
1
1
may be issue is with your
environment.prod.ts
file. add your production
configuration in this file.– Farhat Zaman
Mar 25 at 12:06
may be issue is with your
environment.prod.ts
file. add your production
configuration in this file.– Farhat Zaman
Mar 25 at 12:06
can you post your
environment.prod.ts
?– ForestG
Mar 25 at 12:07
can you post your
environment.prod.ts
?– ForestG
Mar 25 at 12:07
Updated Code @ForestG. Please check it now.
– Anirudh
Mar 25 at 12:11
Updated Code @ForestG. Please check it now.
– Anirudh
Mar 25 at 12:11
Your files, the configuration and the cli command are all correct. I suggest you try a different application server, to see if your app get's deployed. I usually test with http-server, can you check it out and see if it serves your application in prod mode?
– ForestG
Mar 25 at 12:15
Your files, the configuration and the cli command are all correct. I suggest you try a different application server, to see if your app get's deployed. I usually test with http-server, can you check it out and see if it serves your application in prod mode?
– ForestG
Mar 25 at 12:15
|
show 2 more comments
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55337399%2fng-build-prod-aot-not-working-in-angular-6%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55337399%2fng-build-prod-aot-not-working-in-angular-6%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
It still shows Angular is running in the development code. What does that mean?
– JB Nizet
Mar 25 at 12:05
1
may be issue is with your
environment.prod.ts
file. add yourproduction
configuration in this file.– Farhat Zaman
Mar 25 at 12:06
can you post your
environment.prod.ts
?– ForestG
Mar 25 at 12:07
Updated Code @ForestG. Please check it now.
– Anirudh
Mar 25 at 12:11
Your files, the configuration and the cli command are all correct. I suggest you try a different application server, to see if your app get's deployed. I usually test with http-server, can you check it out and see if it serves your application in prod mode?
– ForestG
Mar 25 at 12:15