0

I encounter this error when I want to import a package:

‍‍‍SyntaxError: Cannot use import statement outside a module

import:

import inquirer from 'inquirer';

help me.

S0A1E2
  • 53
  • 1
  • 8

1 Answers1

2

Try adding

     "type": "module",

to you package.json file