只需删除第一行它是错误的原因
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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.