Skip to content

Support for the experimental syntax 'classProperties' isn't currently enabled #131

@NullVoxPopuli

Description

@NullVoxPopuli

Got this error on some of my supporting code

doctor-who-ai/workers/ai/game.js: Support for the experimental syntax 'classProperties' isn't currently enabled (28:8):

  26 | export function fakeGameFrom(model) {
  27 |   class FakeInputManager {
> 28 |     on = voidFn;
     |        ^
  29 |   }
  30 | 
  31 |   class FakeActuator {

Add @babel/plugin-proposal-class-properties (https://git.io/vb4SL) to the 'plugins' section of your Babel config to enable transformation.
If you want to leave it as-is, add @babel/plugin-syntax-class-properties (https://git.io/vb4yQ) to the 'plugins' section to enable parsing.

maybe a bigger question here, is why is this trying to be transpiled anyway? my target browsers (latest chrome and firefox) support class properties?

trace
Add @babel/plugin-proposal-class-properties (https://git.io/vb4SL) to the 'plugins' section of your Babel config to enable transformation.
If you want to leave it as-is, add @babel/plugin-syntax-class-properties (https://git.io/vb4yQ) to the 'plugins' section to enable parsing.
    at Parser._raise (/home/lprestonsegoiii/Development/NullVoxPopuli/doctor-who-thirteen-game-ai/doctor-who-ai/node_modules/@babel/parser/lib/index.js:757:17)
    at Parser.raiseWithData (/home/lprestonsegoiii/Development/NullVoxPopuli/doctor-who-thirteen-game-ai/doctor-who-ai/node_modules/@babel/parser/lib/index.js:750:17)
    at Parser.expectPlugin (/home/lprestonsegoiii/Development/NullVoxPopuli/doctor-who-thirteen-game-ai/doctor-who-ai/node_modules/@babel/parser/lib/index.js:8839:18)
    at Parser.parseClassProperty (/home/lprestonsegoiii/Development/NullVoxPopuli/doctor-who-thirteen-game-ai/doctor-who-ai/node_modules/@babel/parser/lib/index.js:12232:12)
    at Parser.pushClassProperty (/home/lprestonsegoiii/Development/NullVoxPopuli/doctor-who-thirteen-game-ai/doctor-who-ai/node_modules/@babel/parser/lib/index.js:12192:30)
    at Parser.parseClassMemberWithIsStatic (/home/lprestonsegoiii/Development/NullVoxPopuli/doctor-who-thirteen-game-ai/doctor-who-ai/node_modules/@babel/parser/lib/index.js:12125:14)
    at Parser.parseClassMember (/home/lprestonsegoiii/Development/NullVoxPopuli/doctor-who-thirteen-game-ai/doctor-who-ai/node_modules/@babel/parser/lib/index.js:12062:10)
    at /home/lprestonsegoiii/Development/NullVoxPopuli/doctor-who-thirteen-game-ai/doctor-who-ai/node_modules/@babel/parser/lib/index.js:12007:14
    at Parser.withTopicForbiddingContext (/home/lprestonsegoiii/Development/NullVoxPopuli/doctor-who-thirteen-game-ai/doctor-who-ai/node_modules/@babel/parser/lib/index.js:11078:14)
    at Parser.parseClassBody (/home/lprestonsegoiii/Development/NullVoxPopuli/doctor-who-thirteen-game-ai/doctor-who-ai/node_modules/@babel/parser/lib/index.js:11984:10)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions