static UNUSED_TILE = " ";
^
SyntaxError: Unexpected token =
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:616:28)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Function.Module.runMain (module.js:693:10)
at startup (bootstrap_node.js:188:16)
at bootstrap_node.js:609:3
Waiting for the debugger to disconnect...
Когда я закомментирую это свойство c stati c, оно ошибается в следующем файле:
class Tile {
static UNUSED_TILE = " ";
static HUMAN_MARKER = "X";
static COMPUTER_MARKER = "O";
У меня Node 12.4.0. Это происходит только при запуске моего отладчика в PhpStorm 2019.3. node fileName.js
в терминале работает без проблем. Любая идея, что может делать отладчик, чтобы все еще иметь проблемы?
//package.json
"babel": {
"presets": [
"@babel/preset-env"
],
"plugins": [
"@babel/plugin-proposal-class-properties",
"babel-plugin-transform-class-properties"
]
},
"devDependencies": {
"@babel/plugin-proposal-class-properties": "^7.8.3",
"@babel/preset-env": "^7.9.0",
"babel-plugin-transform-class-properties": "^6.24.1",
"eslint": "^6.8.0",
"jest": "^25.2.3",
"jest-cli": "^25.2.3"
}
Настройки отладчика
![Node debugger](https://i.stack.imgur.com/Jg7wu.jpg)