Skip to content

[0.18.0-rc] class properties now needs a semicolon but packager throws a cryptic error #5188

Closed
@gre

Description

@gre
class A { 
  foo = () => console.log("ooo")
}

this used to work, but now in 0.18.0-rc

TransformError: .../index.js: Cannot read property 'error' of null

Do we need to explicitely add some babel plugin now for this? or is it a bug?


answer is you must use a semicolon now, so:

class A { 
  foo = () => console.log("ooo");
}

But the error is not straightforward, this shouldn't break like this in packager

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions