sindresorhus / p-map

Map over promises concurrently
MIT License
1.27k stars 58 forks source link

SyntaxError: Cannot use import statement outside a module #53

Closed mrded closed 2 years ago

mrded commented 2 years ago

After upgrading the module version from v4 -> v5 we start seeing an error:

 Details:

    /node_modules/p-map/index.js:1
    ({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,global,jest){import AggregateError from 'aggregate-error';
                                                                                             ^^^^^^

    SyntaxError: Cannot use import statement outside a module

    > 11 | import pMap from 'p-map';
         | ^

Please let me know if you need more info.

sindresorhus commented 2 years ago

https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c