Node.js V6.2.0 Class Extends Is Not A Function Error? March 20, 2024 Post a Comment So I'm trying to extend a class in node js and the compiler keeps returning the following error: TypeError: Class extends value # is not a function or null I checkedSolution 1: So it turns out I had a circular reference in my code, where I was importing the class that was extending, into the class that itself was extending (tongue twister :P).The obvious fix was to simply remove the extends reference and find another way of doing what I was trying to achieve. In my case it was passing the Venue class properties down into the VenueViews constructor.E.g var x = VenueViews(this) Solution 2: In my instance, it was the same issue as @James111 was experiencing (circular import) due to a factory pattern I was trying to set up in Typescript. My fix was to do move the code into files, similar to the following:Baca JugaSelenium: Managedpromise::32 {[[promisestatus]]: "pending"} Message Shown Before Navigating To The PageError: Cannot Read Property Of UndefinedSpying On Date Constructor With Sinon// ./src/interface.tsimport { ConcreteClass } from'./concrete'; exportinterfaceBaseInterface { someFunction(): any; } exportclassFactory { staticbuild(): BaseInterface { returnnewConcreteClass(); } } // ./src/base.tsimport { BaseInterface } from'./interface'; classBaseClassimplementsBaseInterface { someFunction(): any { returntrue; } } // ./src/concrete.tsimport { BaseClass } from'./base'; exportclassConcreteClassextendsBaseClass { someFunction(): any { returnfalse; } } CopySolution 3: I had faced similar issue, after checking all the workaround finally issue got resolved by deleting the node_modules folder and run npm i. Share You may like these postsAdd State To React Native Dynamically Based On Web Api Using Usestate HookEs6 Classes - Updating Static Properties[nodejs][sequelize] Referenceerror: Cannot Access 'modelname' Before InitializationProto Inheritance From Es6 Class Post a Comment for "Node.js V6.2.0 Class Extends Is Not A Function Error?"