pastelsky / bundlephobia Goto Github PK
View Code? Open in Web Editor NEWποΈ Find out the cost of adding a new frontend dependency to your project
Home Page: https://bundlephobia.com
License: MIT License
ποΈ Find out the cost of adding a new frontend dependency to your project
Home Page: https://bundlephobia.com
License: MIT License
write it in Readme
Can not retrive package info, server response: 502
Tested multiple npm packages, should anyhow return an error code/feedback to user
bundlephobia
stack trace:
Failed to load resource: the server responded with a status of 502 () result:3 Uncaught (in promise) TypeError: Cannot read property 'code' of undefined at t.value (result:3) at p._renderValidatedComponentWithoutOwnerOrContext (app.js:26) at p._renderValidatedComponent (app.js:26) at p._updateRenderedComponent (app.js:26) at p._performComponentUpdate (app.js:26) at p.updateComponent (app.js:26) at performUpdateIfNecessary (app.js:26) at Object.performUpdateIfNecessary (app.js:7) at s (app.js:7) at r.perform (app.js:7) /api/package-history?package=vue-spinner Failed to load resource: the server responded with a status of 502 () result:3 Uncaught (in promise) TypeError: Cannot read property 'code' of undefined at t.value (result:3) at p._renderValidatedComponentWithoutOwnerOrContext (app.js:26) at p._renderValidatedComponent (app.js:26) at p._updateRenderedComponent (app.js:26) at p._performComponentUpdate (app.js:26) at p.updateComponent (app.js:26) at performUpdateIfNecessary (app.js:26) at Object.performUpdateIfNecessary (app.js:7) at s (app.js:7) at r.perform (app.js:7)
@apicase/core
VM114 result:3 {status: "500", description: "A server error has occurred"}
(anonymous) @ VM114 result:3
Promise.catch (async)
r.fetchHistory @ VM114 result:3
r.handleSearchSubmit @ VM114 result:3
r.handleSubmit @ VM95 app.js:26
r @ VM95 app.js:12
i @ VM95 app.js:12
s @ VM95 app.js:12
d @ VM95 app.js:7
m @ VM95 app.js:7
r @ VM95 app.js:26
processEventQueue @ VM95 app.js:7
r @ VM95 app.js:26
handleTopLevel @ VM95 app.js:26
a @ VM95 app.js:26
perform @ VM95 app.js:7
batchedUpdates @ VM95 app.js:26
a @ VM95 app.js:7
dispatchEvent @ VM95 app.js:26
size Failed to load resource: the server responded with a status of 500 ()
VM114 result:3 Uncaught (in promise) TypeError: Cannot read property 'code' of undefined
at t.value (VM114 result:3)
at p._renderValidatedComponentWithoutOwnerOrContext (VM95 app.js:26)
at p._renderValidatedComponent (VM95 app.js:26)
at p._updateRenderedComponent (VM95 app.js:26)
at p._performComponentUpdate (VM95 app.js:26)
at p.updateComponent (VM95 app.js:26)
at performUpdateIfNecessary (VM95 app.js:26)
at Object.performUpdateIfNecessary (VM95 app.js:7)
at s (VM95 app.js:7)
at r.perform (VM95 app.js:7)
Add support for tailwindcss? Would love to see how good it gets compressed.
TimeoutError
The package took more than 30s to build and was aborted. This can happen if the package is very large and / or if the server is under heavy load.
TailwindCSS
Feature Request
Some npm packages are not meant to be bundled, such as test tools like ava
or tape
.
It would be great if bundlephobia could show the size on disk before bundling.
For example, ava and should show 24 MB but it shows 941 kB minified.
I created an issue in siddharthkp/cost-of-modules#50 since it might be out of scope for bundlephobia.
Bug
le_node
bundlephobia/node_modules/le_node/lib/logger.js:176
throw new _error.BadOptionsError(opts, _text2.default.noToken());
^
Error: The opts.token property is missing.
I added the API key from Algolia as instructed in the readme but it seems like this logging service API key is also needed?
Locally I can just modify index.js
(or sign up for LogEntries I suppose), i.e.
const log = new Logger({
token: process.env.LOGENTRIES_TOKEN,
});
but should we just make this optional?
Bug
webpack-serve
I took it one further as the API was throwing a 504. https://bundlephobia.com/api/size?package=webpack-serve&record=true produces:
{
"error":{
"code":"MissingDependencyError",
"message":"This package (or this version) uses `<code>http2</code>`, but does not specify them<br /> either as a dependency or a peer dependency",
"details":{
"name":"MissingDependencyError",
"originalError":[
"ModuleNotFoundError: Module not found: Error: Can't resolve 'http2' in '/tmp/tmp-build/node_modules/webpack-serve/lib'"
],
"extra":{
"missingModules":[
"http2"
]
}
}
}
}
This one is fun because http2
is a Node v9+ built-in. So it would suggest that the service platform the site is running on needs a node bump, or needs to be aware of new built-ins. Or this may be another case of the service being too tricky and overly aggressive checking dependencies.
Cannot load package size
vega
{"error":{"code":"BuildError","message":"Failed to build this package.","details":{"name":"BuildError"}}}
Bug π
BuildError
Failed to build this package.
/tmp/tmp-build/node_modules/prettier/index.js
Module parse failed: Invalid labeled declaration (4045:8)
You may need an appropriate loader to handle this file type.
| }
| _token_stack:
| var lex = function () {
| var token;
| token = lexer.lex() || EOF;
@ /tmp/tmp-build/entries/index-prettier.js 1:11-30"
Searching for anything creates an application error:
Roadmap to 1.0 iff this idea catches on -
alert()s
Bug
envelope
BuildError: Failed to build this package.
(there is not a lot of info available for this error)
Any thoughts on having it parse an entire package.json file and return the combined results? Perhaps even an API end point to pass in package names directly not using this interface in order to calculate that ourselves?
Bug / Feature Request
crizmas-form
I was thinking that the bars were supposed to be ordered based on the version. However, in case of crizmas-form 0.2.4 is before 0.2.3, 0.2.3 is before 0.1.2, 1.0.0 is before 0.2.10, etc. The order is not reversed either, for instance 0.2.2 is before 0.2.4 (which I assume is correct).
On the main UI: https://bundlephobia.com/[email protected]
I triggered the build too early after publishing (mirrors weren't all refreshed?) and it shows the same result than the previous version. I checked later on with another bundle checker and it's definitely much smaller.
I guess now the result is cached and will always show this result for this version?
It would be great to be able to force rebuild from the UI to get the correct size shown.
It seems npm-cost does not work with pure CSS module?
Feature Request
With webpack v4 around the corner, it would be awesome to denote to users searching for packages if their package (in addition to using the "module" field), also is "sideEffect free". We have package authors (see lodash-es) annotate this using a new field called "sideEffects: false". If this is set, webpack can perform even deeper optimizations to a library using ESM. (Also builds are faster because we skip evaluation of those unused exports).
npm-cost
reports react-dom@next
being larger than react-dom@15
which I donβt believe is correct. I wanted to debug it to see if anythingβs confusing Rollup in our bundles.
I tried following the instructions for local development, but Iβm stuck here:
Iβm pretty sure Iβm running Node 8:
What am I doing wrong? Thanks!
Bug: core-js
imports placed by @babel/plugin-transform-runtime
are considered missing dependency errors, despite @babel/runtime
being a dependency, which internally has the core-js
dependency.
extract-files
package.json
@babel/runtime
package.json
https://bundlephobia.com/result?p=extract-files
Feature Request
@devexpress/dx-react-core
@elemental/link
@react-spectre/button
PackageNotFoundError
The package you were looking for doesn't exist.
Bug
webpack-dev-server
I took it a bit further, since the API is throwing a 504. https://bundlephobia.com/api/size?package=webpack-dev-server&record=true returns the following raw output:
{
"error":{
"code":"MissingDependencyError",
"message":"This package (or this version) uses `<code>webpack/hot</code>`, but does not specify them<br /> either as a dependency or a peer dependency",
"details":{
"name":"MissingDependencyError",
"originalError":[
"ModuleNotFoundError: Module not found: Error: Can't resolve 'webpack/hot' in '/tmp/tmp-build/node_modules/webpack-dev-server/client'",
"Error: minifying bundle.js\nProcessTerminatedError: cancel after 2 retries!"
],
"extra":{
"missingModules":[
"webpack/hot"
]
}
}
}
}
While some of the code does indeed "require" webpack/hot
, it's only in files bundled and served to the client. So it may be that bundlephobia is being overly aggressive in this case.
https://github.com/nosir/cleave.js
I checked the package.json and it does have a "main" field, per the error message from the website.
Bug
fetch results react-table
/api/package-history?package=react-table Failed to load resource: the server responded with a status of 502 ()
result:3 SyntaxError: Unexpected token < in JSON at position 0
(anonymous) @ result:3
/api/size?package=react-table&record=true Failed to load resource: the server responded with a status of 502 ()
result:3 Uncaught (in promise) TypeError: Cannot read property 'code' of undefined
at t.value (result:3)
at p._renderValidatedComponentWithoutOwnerOrContext (app.js:26)
at p._renderValidatedComponent (app.js:26)
at p._updateRenderedComponent (app.js:26)
at p._performComponentUpdate (app.js:26)
at p.updateComponent (app.js:26)
at performUpdateIfNecessary (app.js:26)
at Object.performUpdateIfNecessary (app.js:7)
at s (app.js:7)
at r.perform (app.js:7)
Same error for istanbul .
Also the site just went offline.
First, cool project, this has inspired us to add a travis hook to check the bundlesize of our projects and error if it exceeds a certain size: nfl/react-gpt#47
I was trying to see the distribution KB size footprint for react-gpt, and am seeing the "Missing peer dependencies error" here https://bundlephobia.com/[email protected]
I updated the peerDependencies in the project, bumped the version to 0.3.0, but still get the same error here https://bundlephobia.com/[email protected]
Is this a cache issue or have I not resolving the error correctly in the react-gpt project?
Bug.
https://bundlephobia.com/result?p=apollo-upload-client
Just a friendly heads up π.
Also, bundlephobia is awesome.
According to the README https://github.com/pastelsky/bundlephobia#optional-steps, Firebase is optional. However, in the code Firebase calls get executed regardless, throwing BuildError.
Hello! for [email protected] bundlephobia correctly threw MissingDependencyError
(thanks for that! π )
I thought I fixed it in [email protected] -- but I'm still getting an error π€
{"error":{"code":"MissingDependencyError","message":"This package (or this version) uses `<code>prop-types</code>`, but does not specify them<br /> either as a dependency or a peer dependency","details":{"name":"MissingDependencyError","originalError":["ModuleNotFoundError: Module not found: Error: Can't resolve 'prop-types' in '/tmp/tmp-build/node_modules/react-tracking/build'","ModuleNotFoundError: Module not found: Error: Can't resolve 'prop-types' in '/tmp/tmp-build/node_modules/react-tracking/build'"],"extra":{"missingModules":["prop-types"]}}}}
Getting a 500
whenever I enter a search result. Same with the cli.
Not related to a particular package, seems to be an issue with zeit
bundle-phobia react-router
Error happened: invalid json response body at https://bundlephobia.com/api/size?package=react-router reason: Unexpected token A in JSON at position 0
Bug
There is a newer version of firebase released that this project depends on.
Dependency | firebase |
---|---|
Required | ^3.7.3 |
Latest | 4.2.0 |
There might be a bunch of new features, fixes and perf improvements that might help this project.
Please have a look into these changes and try to get onto the latest version of firebase.
Regards!
When I was testing my own package (Vuebar) I've got a little confused because it seems that the bars were out of order.
This image should show it very clearly:
BTW. This project is awesome π
I tried this for css-constructor which starts with the line
import React from 'react'
π
Will this include React's weight as cost as well?
(The lib assumes you are using this for a React project)
https://bundlephobia.com/result?p=semantic-ui
Not that important for my needs, as I was more curious about semantic-react
, but I figured I'd make you aware something is going on here. Anytime I try and check the size for this package, a 500 is returned.
Spinning and spinning and there's a 500 error in console.
When trying to calculate the size of 'Elm', app hangs at 'calculating files sizes'. Chrome dev tools shows the below in the console:
app.js:7 GET https://bundlephobia.com/api/size?package=elm&record=true 500 ()
result:3 Uncaught (in promise) TypeError: Cannot read property 'code' of undefined
at t.value (result:3)
at p._renderValidatedComponentWithoutOwnerOrContext (app.js:26)
at p._renderValidatedComponent (app.js:26)
at p._updateRenderedComponent (app.js:26)
at p._performComponentUpdate (app.js:26)
at p.updateComponent (app.js:26)
at performUpdateIfNecessary (app.js:26)
at Object.performUpdateIfNecessary (app.js:7)
at s (app.js:7)
at r.perform (app.js:7)
Bug
{code: "BuildError", message: "Failed to build this package.", details: {name: "BuildError"}}
Also, tried with bundle-phobia-cli
@pastelsky, The tool is unable to parse the redux-first-router package. It does consist of the entry point and valid dist. Any pointers as to what is going wrong here?
cc /@faceyspacey
Feature Request
By default, the .next
file will be serve as root path, which means files area always requested by example.com/.next/*
. For some reason, I need to serve the static file in spec path, such as example.com/custompath/.next/*
. How can I do this.
Bug? Latest versions of several of my packages display BuildError
, without a useful trace or explanation.
Here is the repo for apollo-upload-client
: https://github.com/jaydenseric/apollo-upload-client.
Feature Request
It would be awesome if this package had better support for Ember addons. Ember addons only bundle a certain subset of files into a browser package, so measuring all of the JS files in the project is resulting in wrong numbers. As a first step I would propose this solution:
package.json
contains an ember-addon
"keyword"app
and addon
folders are considered for the final browser weightBug
Meteor
When selecting "meteor" from the search results autocomplete list, loading this page: https://bundlephobia.com/result?p=meteor
InstallError
Installing the packaged failed.
/api/size?package=meteor&record=true Failed to load resource: the server responded with a status of 500 ()
/api/size?package=meteor&record=true Failed to load resource: the server responded with a status of 524 ()
Uncaught (in promise) TypeError: Cannot read property 'code' of undefined
at t.value (result:3)
at p._renderValidatedComponentWithoutOwnerOrContext (app.js:26)
at p._renderValidatedComponent (app.js:26)
at p._updateRenderedComponent (app.js:26)
at p._performComponentUpdate (app.js:26)
at p.updateComponent (app.js:26)
at performUpdateIfNecessary (app.js:26)
at Object.performUpdateIfNecessary (app.js:7)
at s (app.js:7)
at r.perform (app.js:7)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.