Open SukkaW opened 1 year ago
https://bundlejs.com/?q=%40npmcli%2Farborist
This also faces the same error, also caused by the https://unpkg.com/validate-npm-package-name@5.0.0/lib/
@okikio Would you like to add an option for node like resolving?
I've determined the cause of this issue, but I'll have to delay fixing it by a little bit as I won't be available to fix it issue until a little later on during the week/weekend. This issue seems to be caused by the redirect unpkg.com does when you add a /
to the end of the url. For example, https://unpkg.com/react will lead to react but https://unpkg.com/react/ leads to https://unpkg.com/browse/react/.
I've determined the cause of this issue, but I'll have to delay fixing it by a little bit as I won't be available to fix it issue until a little later on during the week/weekend. This issue seems to be caused by the redirect unpkg.com does when you add a
/
to the end of the url. For example, https://unpkg.com/react will lead to react but https://unpkg.com/react/ leads to https://unpkg.com/browse/react/.
I've tried to switch to other CDNs, but all available CDNs have their flaws:
/
(redirect to browse view)package.json
https://cdn.jsdelivr.net/npm/spdx-license-ids@3.0.13/deprecated
won't redirect to https://cdn.jsdelivr.net/npm/spdx-license-ids@3.0.13/deprecated.json
)I'm so sorry, I'll try my best to get this fixed when I get the chance
I'm so sorry, I'll try my best to get this fixed when I get the chance
Don't worry. The issue is caused by the behavior of existing CDN providers, not by bundlejs
.
IMHO, bundlejs
could add a node-like
resolver (maybe opt-in by an option?):
fs.exists
)/
index
then load and parse that URL instead..js
, .cjs
, .json
), then load and parse each one of them.Promise.any here
to parallel?
https://bundlejs.com/?q=npm%2Flib%2Fcli-entry.js
The error during the bundling:
Where
https://unpkg.com/validate-npm-package-name@5.0.0/lib/
returns HTML (404) whilehttps://unpkg.com/validate-npm-package-name@5.0.0/lib/index.js
does return JS.Is there any option that enables node-like resolving?