Wednesday, October 25, 2017

ReferenceError: __extends is not defined

Per this, the fix for this error when attempting to run Jasmine/Karma tests in an Angular 4 app is to go into tsconfig.json and set...

"noEmitHelpers": true,

 
 

...to instead be:

"noEmitHelpers": false,

 
 

You will have to recompile JavaScript from TypeScript to get this to work as __extends will linger in your old generated JavaScript until you throw it away.

No comments:

Post a Comment