Uncaught Error: Cannot enable prod mode after platform setup.
See original GitHub issueHello
I am not sure this is right place to write this issue but I hope you would know what might be wrong.
After resolving #963 and building my app with yarn install && ng build --project=sz-web --configuration production && ng build --project=sz-admin --configuration production
I am being blocked by this error.
main.11bf15427ba32d8c99af.js:1 Uncaught Error: Cannot enable prod mode after platform setup.
at main.11bf15427ba32d8c99af.js:1
at Module.zUnb (main.11bf15427ba32d8c99af.js:1)
at a (runtime.dda0794417af2e7e33a0.js:1)
at Object.0 (main.11bf15427ba32d8c99af.js:1)
at a (runtime.dda0794417af2e7e33a0.js:1)
at t (runtime.dda0794417af2e7e33a0.js:1)
at Array.r [as push] (runtime.dda0794417af2e7e33a0.js:1)
at main.11bf15427ba32d8c99af.js:1
Here is my full package.json
{
"name": "sz-web-fe",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "yarn install && ng serve --configuration hmr --proxy-config proxy-wpsz.conf.json",
"start-dmz": "yarn install && ng serve --configuration hmr --proxy-config proxy-wpsz-dmz.conf.json --project=sz-web",
"start-w": "ng serve --configuration hmr --proxy-config proxy-wpsz.conf.json --project=sz-web",
"start-wp": "ng serve --configuration hmr --proxy-config proxy-wpsz-vpn.conf.json --project=sz-web",
"start-wpsz-test": "yarn install && ng serve --configuration hmr --proxy-config proxy-wpsz-test.conf.json --project=sz-web --port=6200",
"start-a": "ng serve --configuration hmr --proxy-config proxy-sz.conf.json --project=sz-admin --port=5200",
"start-ap": "ng serve --configuration hmr --proxy-config proxy-sz-vpn.conf.json --project=sz-admin --port=5200",
"build": "yarn install && ng build --project=sz-web --configuration production && ng build --project=sz-admin --configuration production",
"test": "yarn install && ng test",
"lint": "ng lint",
"e2e": "ng e2e",
"postinstall": "ngcc --properties esm5 browser module main --first-only --create-ivy-entry-points",
"cypress:open": "cypress open",
"cypress:test": "cypress run",
"cypress:test:interactive": "cypress run --browser=chrome"
},
"private": true,
"dependencies": {
"@angular/animations": "~9.1.0",
"@angular/common": "~9.1.0",
"@angular/compiler": "~9.1.0",
"@angular/core": "~9.1.0",
"@angular/forms": "~9.1.0",
"@angular/localize": "^9.1.0",
"@angular/platform-browser": "~9.1.0",
"@angular/platform-browser-dynamic": "~9.1.0",
"@angular/router": "~9.1.0",
"@fortawesome/fontawesome-free": "^5.12.1",
"@ng-bootstrap/ng-bootstrap": "^6.1.0",
"@ng-select/ng-option-highlight": "^0.0.5",
"@ng-select/ng-select": "^4.0.4",
"@ngx-translate/core": "^11.0.1",
"@ngx-translate/http-loader": "^4.0.0",
"@types/stacktrace-js": "^0.0.32",
"bootstrap": "^4.3.1",
"class-transformer": "^0.2.3",
"ng2-file-upload": "^1.3.0",
"ngx-quill": "^11.1.0",
"quill": "^1.3.7",
"quill-delta": "^4.2.2",
"rxjs": "~6.5.4",
"stacktrace-js": "^2.0.0",
"tslib": "^1.10.0",
"zone.js": "~0.10.3"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.900.3",
"@angular-devkit/build-ng-packagr": "~0.900.3",
"@angular/cli": "~9.0.3",
"@angular/compiler-cli": "~9.1.0",
"@angular/language-service": "~9.1.0",
"@angularclass/hmr": "^2.1.3",
"@types/jasmine": "~3.3.16",
"@types/jasminewd2": "~2.0.3",
"@types/node": "^12.12.28",
"@types/quill": "^1.3.10",
"@types/quill-delta": "https://github.com/maximkornilov/types-quill-delta/tarball/master",
"codelyzer": "^5.1.2",
"cypress": "^4.4.1",
"jasmine-core": "~3.4.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~4.1.0",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.6",
"karma-jasmine": "~2.0.1",
"karma-jasmine-html-reporter": "^1.5.2",
"ng-packagr": "^9.0.0",
"protractor": "~5.4.3",
"ts-node": "~7.0.1",
"tslint": "~5.15.0",
"typescript": "~3.7.5"
}
}
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Uncaught Error: Cannot enable prod mode after platform setup.
open the page in the chrome,console print error:. vendor.9844cf9b240425f86ca5.bundle.js:1 Uncaught Error: Cannot enable prod mode after ...
Read more >Cannot enable prod mode after platform setup. Angular 5 ...
I have found this error When I use the function isDevMode() in the app.module and ...
Read more >Cannot enable prod mode after platform setup. Angular 5 ...
in file cli-reproapp/src/app/app.constants.ts . So as a workaround you can create a function instead of constant isInDevMode as is shown below.
Read more >Angular (forked) - StackBlitz
if you get 'Cannot enable production mode'. error, please reopen the preview window as. explained here ... 47983242/cannot-enable-prod-mode-after-setup.
Read more >How to add address detail in the Application Section
main-es5.js:1 Error: Cannot enable prod mode after platform setup. at e.enableProdMode (scripts.js:1) at Module.zUnb (main-es5.js:1)
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
no probs man. Thanks for using ngx-quill.
PS: Upgrading to angular 10 is very easy. not so much breaking changes. So you can go with latest ngx-quill version 😃
https://github.com/angular/angular-cli/issues/8340 https://stackoverflow.com/questions/47714132/cannot-enable-prod-mode-after-platform-setup-angular-5-production-build