When I run my project using node ts-node/register I don't get any errors,
however with ts-jest I receive the following:
โ Test suite failed to run
TypeError: Class extends value undefined is not a constructor or null
at Object.<anonymous> (../node_modules/google-gax/src/grpc.ts:110:43)
at Object.<anonymous> (../node_modules/google-gax/src/index.ts:32:1)
The file grpc.ts doesn't actually exist, it's a JS file really.
I wonder why it's trying to include grpc.ts when only a js file exists.
ts-jest should be able to run file like ts-node without the above error.
Apparently I had the wrong path in the package.json jest config as seen below.
"moduleDirectories": [
"src",
Thought I could use relative path src, but I needed to change it to <rootDir> for it to work.
i also go through thr same problem as a begginer.my fault is that i just use c instead of C in component.i know that is very silly mistake.
guys, exist any way to ignore this kind of errors? I'm getting this issue from React Native project
i also go through thr same problem as a begginer.my fault is that i just use c instead of C in component.i know that is very silly mistake.
thanks mahn!
I was getting the same error since it was my first time with component.
The error was instead of writing Component ,i wrote component.
so check whether it is C or c .
@shivanshutiari319, @aditisaran26, what component are you guys trying to talk about?
I've run into this error when attempting to import from a CommonJS module without named exports. I used this workaround:
import * as MFoo from 'foo'; const Foo = MFoo.default || MFoo;
Then class MyFoo extend Foo { ... }.
Most helpful comment
i also go through thr same problem as a begginer.my fault is that i just use c instead of C in component.i know that is very silly mistake.