Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected token: punc ()) error in version 0.7.1 #28

Closed
maihannijat opened this issue Sep 19, 2019 · 2 comments
Closed

Unexpected token: punc ()) error in version 0.7.1 #28

maihannijat opened this issue Sep 19, 2019 · 2 comments

Comments

@maihannijat
Copy link

maihannijat commented Sep 19, 2019

The version 0.7.1 throws error while building with --prod flag. Debug the error with the following line:
ng build --prod --named-chunks --verbose --build-optimizer=false --source-map

And found the error on:

Unexpected token: punc ()) [./node_modules/gauge-chart/dist/bundle.js:169,0]

The line was causing the problem because of the trailing comma:

.attr(
  'transform',
  'translate(' + (n + 2 * e) + ', ' + (n + e) + ')',
)

Removed the trailing comma and tried to build again but the error continues to another line as the file has trailing commas. Finally, downgraded back to 0.6.0 and it works fine. This version contains the uglified code with no trailing commas but the latest version has pretty code but with trailing commas.

@NgModule({
  declarations: [XYZ],
  imports: [
    ...
    GaugeChartModule,
  ]
})

Just to add, I am using the library in my Angular 8 project - not directly building the library with --prod flag.

@greetclock
Copy link
Owner

greetclock commented Sep 19, 2019

@maihannijat thank you for pointing this out. Please, try the new version angular-gauge-chart@0.7.2 that I just published.

The problem was with gauge-chart dependency that stored compiled JS in a wrong way.

@maihannijat
Copy link
Author

@cherurg Thanks for the quick fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants