Skip to content

Module build failed: TypeError: Cannot read property '_statSync' of undefined #12821

@pierregouret

Description

@pierregouret

Bug Report or Feature Request (mark with an x)

- [x ] bug report -> please search issues before submitting
- [ ] feature request

Command (mark with an x)

- [ ] new
- [x ] build
- [ ] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc

Versions

Angular CLI: 1.7.4
Node: 8.12.0
OS: linux x64
Angular: 5.2.11
@angular/cli: 1.7.4
@angular/forms: 5.2.10
@angular-devkit/build-optimizer: 0.3.2
@angular-devkit/core: 0.3.2
@angular-devkit/schematics: 0.3.2
@ngtools/json-schema: 1.2.0
@ngtools/webpack: 1.10.2
@schematics/angular: 0.3.2
@schematics/package-update: 0.3.2
typescript: 2.4.2
webpack-node-externals: 1.7.2
webpack: 3.12.0

Repro steps

@angular/cli: 1.7.4

ng new app-ng5
ng build -prod

The log given by the failure

ERROR in ./src/app/app.module.ngfactory.js
Module build failed: TypeError: Cannot read property '_statSync' of undefined
at stat (/projects/test/app-project/node_modules/@ngtools/webpack/src/virtual_file_system_decorator.js:26:29)
at toDepDetails (/projects/test/app-project/node_modules/cache-loader/dist/index.js:66:5)
at arrayIterator (/projects/test/app-project/node_modules/neo-async/async.js:3780:9)
at timesSync (/projects/test/app-project/node_modules/neo-async/async.js:2292:7)
at Object.mapLimit (/projects/test/app-project/node_modules/neo-async/async.js:3775:5)
at Array. (/projects/test/app-project/node_modules/cache-loader/dist/index.js:89:18)
at arrayEachFunc (/projects/test/app-project/node_modules/neo-async/async.js:2512:19)
at Object.parallel (/projects/test/app-project/node_modules/neo-async/async.js:6867:9)
at Object.loader (/projects/test/app-project/node_modules/cache-loader/dist/index.js:88:9)
ERROR in ./node_modules/core-js/es7/reflect.js
Module build failed: TypeError: Cannot read property '_statSync' of undefined
at stat (/projects/test/app-project/node_modules/@ngtools/webpack/src/virtual_file_system_decorator.js:26:29)
at toDepDetails (/projects/test/app-project/node_modules/cache-loader/dist/index.js:66:5)
at arrayIterator (/projects/test/app-project/node_modules/neo-async/async.js:3780:9)
at timesSync (/projects/test/app-project/node_modules/neo-async/async.js:2292:7)
at Object.mapLimit (/projects/test/app-project/node_modules/neo-async/async.js:3775:5)
at Array. (/projects/test/app-project/node_modules/cache-loader/dist/index.js:89:18)
at arrayEachFunc (/projects/test/app-project/node_modules/neo-async/async.js:2512:19)
at Object.parallel (/projects/test/app-project/node_modules/neo-async/async.js:6867:9)
at Object.loader (/projects/test/app-project/node_modules/cache-loader/dist/index.js:88:9)
ERROR in ./node_modules/@angular/platform-browser/esm5/platform-browser.js
Module build failed: TypeError: Cannot read property '_statSync' of undefined
at stat (/projects/test/app-project/node_modules/@ngtools/webpack/src/virtual_file_system_decorator.js:26:29)
at toDepDetails (/projects/test/app-project/node_modules/cache-loader/dist/index.js:66:5)
at arrayIterator (/projects/test/app-project/node_modules/neo-async/async.js:3780:9)
at timesSync (/projects/test/app-project/node_modules/neo-async/async.js:2292:7)
at Object.mapLimit (/projects/test/app-project/node_modules/neo-async/async.js:3775:5)
at Array. (/projects/test/app-project/node_modules/cache-loader/dist/index.js:89:18)
at arrayEachFunc (/projects/test/app-project/node_modules/neo-async/async.js:2512:19)
at Object.parallel (/projects/test/app-project/node_modules/neo-async/async.js:6867:9)
at Object.loader (/projects/test/app-project/node_modules/cache-loader/dist/index.js:88:9)
ERROR in ./node_modules/zone.js/dist/zone.js
Module build failed: TypeError: Cannot read property '_statSync' of undefined
at stat (/projects/test/app-project/node_modules/@ngtools/webpack/src/virtual_file_system_decorator.js:26:29)
at toDepDetails (/projects/test/app-project/node_modules/cache-loader/dist/index.js:66:5)
at arrayIterator (/projects/test/app-project/node_modules/neo-async/async.js:3780:9)
at timesSync (/projects/test/app-project/node_modules/neo-async/async.js:2292:7)
at Object.mapLimit (/projects/test/app-project/node_modules/neo-async/async.js:3775:5)
at Array. (/projects/test/app-project/node_modules/cache-loader/dist/index.js:89:18)
at arrayEachFunc (/projects/test/app-project/node_modules/neo-async/async.js:2512:19)
at Object.parallel (/projects/test/app-project/node_modules/neo-async/async.js:6867:9)
at Object.loader (/projects/test/app-project/node_modules/cache-loader/dist/index.js:88:9)
ERROR in ./node_modules/@angular/core/esm5/core.js
Module build failed: TypeError: Cannot read property '_statSync' of undefined
at stat (/projects/test/app-project/node_modules/@ngtools/webpack/src/virtual_file_system_decorator.js:26:29)
at toDepDetails (/projects/test/app-project/node_modules/cache-loader/dist/index.js:66:5)
at arrayIterator (/projects/test/app-project/node_modules/neo-async/async.js:3780:9)
at timesSync (/projects/test/app-project/node_modules/neo-async/async.js:2292:7)
at Object.mapLimit (/projects/test/app-project/node_modules/neo-async/async.js:3775:5)
at Array. (/projects/test/app-project/node_modules/cache-loader/dist/index.js:89:18)
at arrayEachFunc (/projects/test/app-project/node_modules/neo-async/async.js:2512:19)
at Object.parallel (/projects/test/app-project/node_modules/neo-async/async.js:6867:9)
at Object.loader (/projects/test/app-project/node_modules/cache-loader/dist/index.js:88:9)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions