sindresorhus / p-map

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

Browser Compatibility with `^5.0.0` #59

Closed rwv closed 2 years ago

rwv commented 2 years ago

After upgrading to ^5.0.0, vite got an error:

browser-external:os:3 Uncaught Error: Module "os" has been externalized for browser compatibility and cannot be accessed in client code.
    at Object.get (browser-external:os:3:11)
    at index.js:6:27

After some digging, this is related to aggregate-error ^4.0.0's dep clean-stack ^4.0.0

import os from 'os' (index.js#L1)

I wonder could homedir be implemented in a browser-friendly way?

I don't know which repo is the most suitable place to open this issue, please transfer to the right place if needed.

Thank you!

rwv commented 2 years ago

Oh! I found that similar issue had already be opened. Sorry for interrupt. https://github.com/sindresorhus/clean-stack/issues/28

furudean commented 2 years ago

I maintain a fork of this which has the aggregate-error dependency patched out in favor of the native implementation. https://github.com/furudean/p-map

silverwind commented 1 year ago

Should be properly fixed once https://github.com/sindresorhus/p-map/issues/64 is resolved.