avoidwork / filesize.js

JavaScript library to generate a human readable String describing the file size
https://filesizejs.com
BSD 3-Clause "New" or "Revised" License
1.61k stars 97 forks source link

Version 10.1.5 not working with node 10.21.0 & npm 6.14.4 #185

Closed weberpatrick closed 1 month ago

weberpatrick commented 1 month ago

npm: 6.14.4 node: 10.21.0

My application automatically installed the new version 10.1.5 today and it is not working anymore now. With version 10.1.4 it is working fine.

Now I get this when running my application:

/.../node_modules/filesize/dist/filesize.cjs:176
            x = separator || (i.match(/(\D)/g)?.pop() ?? PERIOD),
                                               ^

SyntaxError: Unexpected token .
    at Module._compile (internal/modules/cjs/loader.js:723:23)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (/.../out/src/controllers/requestController.js:37:20)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
avoidwork commented 1 month ago

Sorry about that, this is fixed in 10.1.6