sindresorhus / p-queue

Promise queue with concurrency control

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

p-queue is not correctly exported and breaks Bundlephobia and unpkg.

Murderlon opened this issue · comments

Going to https://unpkg.com/p-queue:

Cannot find "/index.js" in p-queue@7.4.1

esm.sh does work: https://esm.sh/p-queue@7.4.1

/* esm.sh - p-queue@7.4.1 */
import "/v133/eventemitter3@5.0.1/es2022/eventemitter3.mjs";
import "/v133/p-timeout@5.1.0/es2022/p-timeout.mjs";
export * from "/v133/p-queue@7.4.1/es2022/p-queue.mjs";
export { default } from "/v133/p-queue@7.4.1/es2022/p-queue.mjs";

But going to https://bundlephobia.com/package/p-queue

EntryPointError
We could not guess a valid entry point for this package. Perhaps the author hasn't specified one in its package.json ?

We are also having issues in Uppy, which uses Parcel and fails on the p-queue import. We have to locally patch it yarn patch.

I'm not sure what the fix is here, the package.json seems fine and it does work in Vite for instance.

My guess would be that Unpkg doesn't suppor the exports field in package. This is a problem with Unpkg, not this package.

We also faced the problem in Uppy with Parcel but until I can reproduce this in an isolated way I'll close this.