Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Harder to install 0.16.0 due to dependency on brotli-size #202

Closed
edmorley opened this issue Feb 23, 2018 · 3 comments
Closed

Harder to install 0.16.0 due to dependency on brotli-size #202

edmorley opened this issue Feb 23, 2018 · 3 comments

Comments

@edmorley
Copy link
Contributor

edmorley commented Feb 23, 2018

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:

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
@edmorley edmorley changed the title Unable to install 0.16.0 due to dependency on brotli-size Harder to install 0.16.0 due to dependency on brotli-size Feb 23, 2018
brodycj pushed a commit to brodycj/preact that referenced this issue Jul 17, 2018
for extra brotli-size build requirement ref:
siddharthkp/bundlesize#202
@austinpray
Copy link

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

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

@styfle
Copy link

styfle commented May 24, 2019

Brotli is available in core since Node 11 https://nodejs.org/docs/latest-v11.x/api/zlib.html

@siddharthkp
Copy link
Owner

@styfle There's great. That's going to help make it optional 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants