1

我最近克隆了一个我正在尝试调试的 Web 应用程序(Node.js/Express + React)。

我尝试使用节点调试器,也尝试使用我的 WebStorm 配置在调试模式下运行应用程序。

我在这两种情况下看到的错误如下:

Unhandled rejection SyntaxError: Unexpected reserved word
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:373:25)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)

这是我的脚本部分的一部分package.json

  "main": "server.js",
  "scripts": {
    "start": "webpack && babel-node server.js",
    "test": "grunt test",
    "build": "grunt build",
    "all": "npm run build && npm run test"
  },

我不确定这个错误是什么以及如何让调试器运行。

4

0 回答 0