top of page

TS issue with Circular dependency

  • Writer: khyati sehgal
    khyati sehgal
  • Aug 20, 2014
  • 1 min read

TypeError: Class extends value undefined is not a function or null

Problem

Circular dependency

protractor-TS issue
  1. I was trying to create an object of class which I have already extended

  2. I was trying to import a class which I have already extended

Solution:-

Ways I tried

On root folder, installing and ts-node and typescripts again just to check the compatibility of the versions.

npm install ts-node --save-dev
npm install typescript -g 
npm install typescript --save-dev 

In protractor config, changed the way beforeLaunch was written.

protractorComf
beforeLaunch: function () {
require('ts-node/register')
} 

This was causing the problem:

  1. Use private static getter

  2. Avoid static members which are resolved during load time

  3. Remove the extends reference

Recent Posts

See All

Comments


bottom of page