Cannot read property 'create' of undefined angular 4

888 Views Asked by At

Angular giving error in the production. Ng build --prod. error picture below. My angular cli version

Thanks for your help in advance!

1

There are 1 best solutions below

1
On

to debug this open your main.****.bundle.js and make intent in browser console and try to see where it getting.

in the code you can also guess which function have a create method and debug what it is undefined in --aot build.

Sometime its just the resolver problem, so you can resolve that by adding below dependencies

"enhanced-resolve": "3.3.0",