Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Angular build Failing with "Data path '.sourceMap' should be object."

I am building my angular application using the angular CLI command ng test --source-map=false

Everything was working fine, but suddenly I have started encountering the below error

Schema validation failed with the following errors:
Data path ".sourceMap" should be object.
Data path ".sourceMap" should be boolean.
Data path ".sourceMap" should match exactly one schema in oneOf.

On some inspection, the issue seems to originate from the --source-map parameter, but not sure about the exact cause.

like image 850
goyalM Avatar asked Feb 08 '19 16:02

goyalM


2 Answers

There was a bug with the --source-map flag that would throw those errors. The latest version of the @angular-devkit/build-angular has a fix for this (0.13.6).

like image 106
brosenquist Avatar answered Nov 03 '22 14:11

brosenquist


The parameter for source maps is

--sourceMap=true|false

See : https://angular.io/cli/test

like image 22
dataphile Avatar answered Nov 03 '22 13:11

dataphile