Skip to content

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

@ghost

Description

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 !

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions