bundlephobia
bundlephobia copied to clipboard
InstallError: ember-resources -- installing the packaged failed
ember-resources
error: https://bundlephobia.com/package/ember-resources github: (builds with rollup): https://github.com/NullVoxPopuli/ember-resources/tree/main/ember-resources but on npm, it's pre-built as a single file
Entire (stringified) error that I see in my browser console
Object { error: {…} }
error: Object { code: "InstallError", message: "Installing the packaged failed.", details: {} }
code: "InstallError"
details: Object { }
<prototype>: Object { … }
message: "Installing the packaged failed."
<prototype>: Object { … }
<prototype>: Object { … }
react_devtools_backend.js:2540:25
overrideMethod react_devtools_backend.js:2540
r ResultPage.js:106
(Async: promise callback)
r ResultPage.js:79
r ResultPage.js:179
React 3
unstable_runWithPriority scheduler.production.min.js:18
React 4
unstable_runWithPriority scheduler.production.min.js:18
React 6
ye index.tsx:520
ye index.tsx:789
e index.tsx:425
l runtime.js:63
_invoke runtime.js:293
P runtime.js:118
Babel 4
NextJS 2
e index.tsx:411
l runtime.js:63
_invoke runtime.js:293
P runtime.js:118
Babel 8
ie NextJS
BMP1 next.js:5
Webpack 4
Same with: https://bundlephobia.com/package/ember-statechart-component
Same with: https://bundlephobia.com/package/ember-stargate
Does bundle phobia have assumptions around how these libraries should be built?
They're already built. What's in dist/ is all there is. No need to worry about dependencies or anything, because the consuming application handles that.
@NullVoxPopuli I faced same issue and run bundlephobia locally, seems like a timeout issue. Feel free to use my PR https://github.com/pastelsky/bundlephobia/pull/596 if it helps. Any feedback welcome.
@NullVoxPopuli I tried your package in local bundlephobia and it seems to have real build issue not the timeout one as mine.
Thanks for taking a look! What is it building with? I use rollup, and it builds just fine. Is it also trying to parse / load the module? I target fairly modern browsers, so i wonder if whatever is throwing that error just doesn't support all stage 3/4 proposals that are currently available in chrome/firefox?
Based on the picture, it's struggling with ??
, perhaps?
You may look into this stackoverflow post https://stackoverflow.com/questions/63423384/you-may-need-an-additional-loader-to-handle-the-result-of-these-loaders Could be problem that you might be emitting ES2020 to dist/ folder. Just a hint, you may need to debug deeper into this, or wait for @pastelsky to confirm this.
I recently written some boilerplates based on rollup, where this is not the issue, in case if it helps. https://github.com/hackingbay/react-package-boilerplate - ReactJS https://github.com/hackingbay/js-package-minimal-boilerplate - PlainJS
Typescript versions I am bringing soon.
you might be emitting ES2020 to dist/ folder
Why is that a problem tho? Like, i won't emit less modern code. -- browsers support the syntax I'm using.
Is there a way to tell the bundlephobia loader what targets to use?
boilerplates based on rollup, where this is not the issue, in case if it helps.
Thanks for these - my compilation is fine though in real world uses / production apps.
Is the solution to make bundlephobia's analysis target evergreen browsers?
is it sufficient to have bundlephobia to just measure the file sizes in dist
?
@NullVoxPopuli no, there's no standard indicating that built files must be in a dist
folder — and hence packages usually have different dist paths. Also, a majority of libraries do not bundle files in dist
— they just run it through babel. Which is the reason bundlephobia was created — and we continue to aim to be library agnostic.
You must indicate an entry point into your application (via a main
package.json entry) in this case, otherwise consumes would not be able to use your library without diving inside `dist, which is an antipattren.
My package.json declares 'exports' as main is insufficient (and also allows files to be 'wherever'). Will bundle phobia support 'exports'?
#379