Cannot use import statement outside a module

I was getting this error: `SyntaxError: Cannot use import statement outside a module`

Fixing this error when working with Vue + Jest + Typescript.

Caused by a missing package, most likely one of these:

  • @babel/plugin-transform-modules-commonjs
  • @babel/preset-typescript
  • @types/jest
  • @vue/cli-plugin-typescript