bundlesize
bundlesize copied to clipboard
Harder to install 0.16.0 due to dependency on brotli-size
Hi! Thank you for a great tool :-)
Do you want to request a feature or report a bug? Ease of use regression between 0.15.3 and 0.16.0.
What is the current behavior? #194 (released in 0.16.0) added support for tracking the brotli sizes of files, however to do so it had to add a dependency on brotli-size, which itself has a dependency on iltorb.
If iltorb isn't able to find a pre-compiled binary, it has to build using node-gyp, which requires Python and g++ be installed - which often aren't in Docker images, or in Windows environments.
For users that aren't making use of the brotli size feature, it would be a shame to have to install Python/g++ just to allow bundlesize to install. Perhaps brotli-size
could be made an optional dependency?
It's worth also noting that:
- compiled dependencies are pretty painful at the moment even when they succeed, due to yarnpkg/yarn#932
- the
brotli-size
dependency doubled the install size and package dependency count of bundlesize (taking it up to ~200 dependencies!) - iltorb currently doesn't work with repositories that are using the
no-bin-links
feature (necessary when using npm/yarn inside a linux Vagrant environment using shared folders with a Windows host). I'll be filing an issue against iltorb shortly for this. Edit: filed MayhemYDG/iltorb#58
If the current behavior is a bug, please provide the steps to reproduce.
docker run --rm -it node:9-slim yarn add [email protected] --dev
...which results in: https://emorley.pastebin.mozilla.org/9078461
What is the expected behavior?
Successful install, like with 0.15.3:
docker run --rm -it node:9-slim yarn add [email protected] --dev
...which results in: https://emorley.pastebin.mozilla.org/9078471
Please mention other relevant information.
- node version: 9.6.0
- npm version: N/A (yarn 1.3.2)
- Operating system: Multiple (but Debian jessie for the example above)
- bundlesize version: 0.16.0
If the current behavior is a bug, please provide the steps to reproduce.
docker run --rm -it node:9-slim yarn add [email protected] --dev
...which results in: https://emorley.pastebin.mozilla.org/9078461What is the expected behavior? Successful install, like with 0.15.3:
docker run --rm -it node:9-slim yarn add [email protected] --dev
...which results in: https://emorley.pastebin.mozilla.org/9078471
These pastebin links are 404ing right now. Here is a 2019 update:
If the current behavior is a bug, please provide the steps to reproduce.
docker run --rm -it node:12-slim npx [email protected]
...which results in:
The following log
sh: 1: detect-libc: Permission denied
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack at PythonFinder.failNoPython (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:484:19)
gyp ERR! stack at PythonFinder.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:406:16)
gyp ERR! stack at F (/usr/local/lib/node_modules/npm/node_modules/which/which.js:68:16)
gyp ERR! stack at E (/usr/local/lib/node_modules/npm/node_modules/which/which.js:80:29)
gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/which/which.js:89:16
gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/isexe/index.js:42:5
gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/isexe/mode.js:8:5
gyp ERR! stack at FSReqCallback.oncomplete (fs.js:149:21)
gyp ERR! System Linux 5.0.8-arch1-1-ARCH
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /root/.npm/_npx/1/lib/node_modules/bundlesize/node_modules/iltorb
gyp ERR! node -v v12.3.1
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
[############......] | install: info lifecycle [email protected]~install: Failed to
[############......] | install: info lifecycle [email protected]~install: Failed to
[############......] | install: info lifecycle [email protected]~install: Failed to
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `detect-libc prebuild-install || node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2019-05-24T16_21_06_822Z-debug.log
Install for [ '[email protected]' ] failed with code 1
What is the expected behavior? Successful install, like with 0.15.3
Brotli is available in core since Node 11 https://nodejs.org/docs/latest-v11.x/api/zlib.html
@styfle There's great. That's going to help make it optional 🎉