2

There are 2 best solutions below

0
Mohamed Mirghani On

Just remove the first line it the cause of the error

0
Pishameni On

You are using ES6 syntax import, either use require in the first line or add "type":"module" to your package.json file.

"type":"module" enables ES6 import/export functions on a NodeJs project.