node-ytdl-core: Angular Electron not building on 2.1.5 Unexpected token: punc ()

On 2.1.5 my electron angular 7 app runs when npm start, but on production mode it fails like this: ERROR in main.cd7adcc1ce764ef292fd.js from Terser Unexpected token: punc ()) [./node_modules/ytdl-core/lib/info.js:147,0][main.cd7adcc1ce764ef292fd.js:96082,4] My typescript target is es2015

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 16 (10 by maintainers)

Commits related to this issue

Most upvoted comments

I fixed the pull request. Lint requires a trailing comma after the last element of an array, or variable definition, if the end bracket is on another line than the last array element or variable definition.

Putting the comma there, however, breaks the webpack build. This seems caused by a rule in the terser webpack plugin. I found an identical issue here: https://github.com/vega/vega/issues/2645