【Debug】解决SyntaxError: Cannot use import statement outside a module问题

在这里插入图片描述
出现这种错误的主要原因就是不支持ES6语法!
然后我们需要在package.json中添加1个配置

{
  + "type": "module",
  "dependencies": {
    "jsencrypt": "^3.3.1",
    "yarn": "^1.22.19"
  }
}

posted @ 2023-02-12 16:52  Tricia11  阅读(168)  评论(0)    收藏  举报  来源