The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

522937 (2) [Avatar] Offline
Great book, I have made it to the final section and built the example all along the way which has been a great learning exercise.

However I have a few problems when I try to use the Angular App from Express.

1. The build too does not give a vendor bundle as shown in the book - is this necessary?
2. When the Express application is loading I get an uncaught reference error: webpackJsonp is not defined at pollyfills.<number>.bundle.js
3. Also I get an uncaught Error: Angular requires Zone.js
4. Problem with loading

Can anyone help me with these errors?

159657 (1) [Avatar] Offline
I'm having the same issues.

4) was easy enough to fix by copying the file from the github source into my local directory ./public/stylesheets/. Note that the stylesheets directory is later copied into ./app_public/src/assets

1) I'm not getting a vendor file either during the ng build...

3) I'm also getting the error that angular requires zone.js when I try to load from localhost:3000 <<<solved, see below>>>

zone seems to be included in the polyfills.js file, but it doesn't seem to be getting imported. My versions for angular/cli follows

Angular CLI: 1.6.0
Node: 6.11.1
OS: win32 x64
Angular: 5.1.0
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

@angular/cli: 1.6.0
@angular-devkit/build-optimizer: 0.0.35
@angular-devkit/core: 0.0.22
@angular-devkit/schematics: 0.0.41
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.9.0
@schematics/angular: 0.1.10
@schematics/schematics: 0.0.10
typescript: 2.4.2
webpack: 3.10.0

OK, found my problem. I had the main.###.bundle.js file included before the polyfills.###.bundle.file polyfills contains the inclusion of zone prior to main attempting to access it. It was clearly written in the book, I just missed it.