isDevMode / enableProdMode error :Cannot enable prod mode after platform setup
问题 I have just upgraded our project to Angular 4.1.0. This also included upgrading webpack to 2.2.1, and upgrading ngx-boostrap to 1.9.2 amongst other package upgrades. After upgrading all this, I tested everything with webpack dev server, in dev mode and all was fine. I then tried a production webpack build. The build worked fine, but upon running our site I immediately get the error 'Cannot enable prod mode after platform setup'. Having investigated using Chrome dev tools, I can see that ngx