I am upgrading jest from version 23 to 29. My project used to work fine before the upgrade, suddenly started observing this issue. I use Typescript as a language.
TestPageDefs Module looks like below:
import { lxExplorer } from "../pageObjects/explorer/lxExplorer.pom";
export class TestPageDefs {
// Page object files
public static explorerPage: lxExplorer = new lxExplorer();
}
This is consumed in another module/class.
import { TestPageDefs } from "../../helpers/TestPageDefs";
export class lxLinkAnalysis extends BasePluginPage<lxLinkAnalysis> {
public ebsLinkClassifyCountQuery: string = TestPageDefs.explorerPage.ebsTableQuery + " | link 'Log Source' | classify Count";
}
Getting below error.
TypeError: Cannot read property 'explorerPage' of undefined
I did tried other import like default or all imports (*). Nothing helped.

../../helpers/TestPageDefsis the right module with theTestPageDefsnamed export?TestPageDefsby Pressingcontroland clicking on../../helpers/TestPageDefs.