Nilay Singh
Nilay Singh

Reputation: 2331

Angular6 getting error when building site for production

I was using Angular: 6.0.3 and when I updated my angular using npm update I am getting error when I am trying to build site for production.

When I am running command:

ng build --prod

I am getting error:

ERROR in ./src/app/app.module.ngfactory.js Module build failed: TypeError: Cannot read property '_statSync' of undefined

Current angular version is: 6.1.10

Full error you can see it here:Full error report link

Upvotes: 1

Views: 27

Answers (1)

Syed Shakir Ali
Syed Shakir Ali

Reputation: 48

That error is because of the version of cache-loader in package.json file. just run npm update and you will get cache-loader 1.2.5 they have fixed this in updated version.

Upvotes: 1

Related Questions