0

I am using Angular 5.2 and building the project in the Azure DevOps with Builds.

Today, suddenly the DevOps build definition has started throwing error in the command ng build.

Here is the snapshot of the error :-

**

2018-10-31T09:39:04.6711840Z ##[section]Starting: Step-3.B :: Build PDL Angular Project 
2018-10-31T09:39:04.6719705Z ==============================================================================
2018-10-31T09:39:04.6719786Z Task         : Command Line
2018-10-31T09:39:04.6719821Z Description  : Run a command line with arguments
2018-10-31T09:39:04.6719855Z Version      : 1.1.3
2018-10-31T09:39:04.6719889Z Author       : Microsoft Corporation
2018-10-31T09:39:04.6719946Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkID=613735)
2018-10-31T09:39:04.6719980Z ==============================================================================
2018-10-31T09:39:04.6819517Z ##[command]ng build --prod -e=dev --base-href=/
2018-10-31T09:40:11.5955017Z [0mDate: [1m[37m2018-10-31T09:40:11.592Z[39m[22m[0m
2018-10-31T09:40:11.5955351Z [0m[0m
2018-10-31T09:40:11.5955401Z [0m[1m[31mERROR in ./node_modules/core-js/es6/date.js[39m[22m[0m
2018-10-31T09:40:11.5955469Z [0m[1m[31mModule build failed: TypeError: Cannot read property '_statSync' of undefined[39m[22m[0m
2018-10-31T09:40:11.5955575Z [0m[1m[31m    at stat (D:\a\1\s\node_modules\@ngtools\webpack\src\virtual_file_system_decorator.js:26:29)[39m[22m[0m
2018-10-31T09:40:11.5955620Z [0m[1m[31m    at toDepDetails (D:\a\1\s\node_modules\cache-loader\dist\index.js:66:5)[39m[22m[0m
2018-10-31T09:40:11.5955663Z [0m[1m[31m    at arrayIterator (D:\a\1\s\node_modules\neo-async\async.js:3780:9)[39m[22m[0m
2018-10-31T09:40:11.5955726Z [0m[1m[31m    at timesSync (D:\a\1\s\node_modules\neo-async\async.js:2292:7)[39m[22m[0m
2018-10-31T09:40:11.5955768Z [0m[1m[31m    at Object.mapLimit (D:\a\1\s\node_modules\neo-async\async.js:3775:5)[39m[22m[0m
2018-10-31T09:40:11.5955822Z [0m[1m[31m    at Array.<anonymous> (D:\a\1\s\node_modules\cache-loader\dist\index.js:89:18)[39m[22m[0m
2018-10-31T09:40:11.5955885Z [0m[1m[31m    at arrayEachFunc (D:\a\1\s\node_modules\neo-async\async.js:2512:19)[39m[22m[0m
2018-10-31T09:40:11.5955933Z [0m[1m[31m    at Object.parallel (D:\a\1\s\node_modules\neo-async\async.js:6867:9)[39m[22m[0m
2018-10-31T09:40:11.5955974Z [0m[1m[31m    at Object.loader (D:\a\1\s\node_modules\cache-loader\dist\index.js:88:9)[39m[22m[0m
2018-10-31T09:40:11.5956034Z [0m[1m[31mERROR in ./src/app/app.module.ngfactory.js[39m[22m[0m

**

We did not made any changes in the DevOps in the Build definition.

Please advise, where could be the issue.

Karan
  • 3,265
  • 9
  • 54
  • 82

1 Answers1

0

Adding "cache-loader":"1.2.2" to the package.json file rectified the issue.

Karan
  • 3,265
  • 9
  • 54
  • 82