Home > database >  SyntaxError: Cannot use import statement outside a module React-Native
SyntaxError: Cannot use import statement outside a module React-Native

Time:06-08

enter image description here

Hello everyone I hope you're doing okey , I had this problem with googlesignin , I did mock it , then problem with firebase again did mock it , now Im getting this error and I can't find any solution for it

CodePudding user response:

I believe adding a transformIgnorePatterns to your jest config file will solve your problem.

transformIgnorePatterns: [
"node_modules/(?!(react-native-root-siblings|react-native|my-project|react-native-button)/)",
  ],

enter image description here

this is weird , I can't find a proper solution , I did try different transformignorePatterns

  • Related