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.

0

1 Answer 1

2

Try adding

     "type": "module",

to you package.json file

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.