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 ()) [./node_modules/rangetouch/src/js/utils/numbers.js:15,0] #21

Open
ghost opened this issue Oct 17, 2019 · 0 comments

Comments

@ghost
Copy link

ghost commented Oct 17, 2019

I add this package at Angular 7 project

But, I had a error like this in executing AOT build ( $ ng build --prod --named-chunks --verbose --build-optimizer=false --source-map )

Unexpected token: punc ()) [./node_modules/rangetouch/src/js/utils/numbers.js:15,0]

I think this error comes from Math.max method
And I avoid error by removing comma from numbers.js L:14

return Math.max(
        0,
        // Number of digits right of decimal point.
        (match[1] ? match[1].length : 0) -
            // Adjust for scientific notation.
            (match[2] ? +match[2] : 0),
    );
return Math.max(
        0,
        // Number of digits right of decimal point.
        (match[1] ? match[1].length : 0) -
            // Adjust for scientific notation.
            (match[2] ? +match[2] : 0) // <-- remove comma and build success
    );

Thank you for great project !

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

0 participants