PatrickJS-starter icon indicating copy to clipboard operation
PatrickJS-starter copied to clipboard

My Angular 2 app fails after webpack build if it takes more than about 9000 ms more or less

Open mmgyce opened this issue 10 years ago • 1 comments

The webpack output seems to be ok, without fails, but when I try to run the app in the browser ...

Uncaught TypeError: Cannot read property 'call' of undefined__webpack_require__  @ file-reader.ts:5
(anonymous function) @ main.bundle.js:9
__webpack_require__ @ file-reader.ts:5
webpackJsonpCallback @ file-reader.ts:5
(anonymous function) @ main.bundle.js:1
> webpack --config webpack.prod.config.js --progress --profile --colors --display-error-details --display-cached --bail

8672ms build modules      
18ms seal
112ms optimize
367ms hashing
61ms create chunk assets
3ms additional chunk assets 
156ms optimize chunk assets
1460ms optimize assets
69ms emit
Hash: 0946056d787690292d4a
Version: webpack 1.12.14
Time: 10974ms <- I refer to this time

If I comment some routes in the RouteConfig section from the app.ts file, the build takes less time, 8000 ms more or less and my Angular 2 app executes normally without fails.

mmgyce avatar Mar 16 '16 09:03 mmgyce

I can confirm the same issue. Build becomes unusable and the only error it provides in browser is

Uncaught TypeError: Cannot read property 'call' of undefined

__webpack_require__ @   polyfills.bundle.js:575
fn  @   polyfills.bundle.js:99
(anonymous function)    @   main.ts?8cfe:4
(anonymous function)    @   app.bundle.js:1482
__webpack_require__ @   polyfills.bundle.js:575
fn  @   polyfills.bundle.js:99
(anonymous function)    @   app.bundle.js:7
__webpack_require__ @   polyfills.bundle.js:575
webpackJsonpCallback    @   polyfills.bundle.js:22
(anonymous function)    @   app.bundle.js:1

ihorskyi avatar Mar 18 '16 00:03 ihorskyi