lit-element\lib\decorators.js: Unexpected token error

Viewed 402

I am getting this error while running my react application.

./node_modules/lit-element/lib/decorators.js
SyntaxError: C:\Development\Teams development\teams-master\node_modules\lit-element\lib\decorators.js: Unexpected token (209:21)

  207 |     name) => {
  208 |         const descriptor = {
> 209 |             async get() {
      |                      ^
  210 |                 await this.updateComplete;
  211 |                 return this.renderRoot.querySelector(selector);
  212 |             },
1 Answers

This is open issue in Babel after upgrade to latest v7.11.1

https://github.com/babel/babel/issues/11914

While there isn't fix ready you can try to downgrade it:

"resolutions": {
  "@babel/core/@babel/parser": "7.11.0"
}
Related