firebase-tools
firebase-tools copied to clipboard
incredibly huge package size (687MB)
Hi. The package size is greater than the size of all other packages in the sum for each project.
[REQUIRED] Environment info
firebase-tools: 10.6.0
Platform: macOS
[REQUIRED] Test case
du -sh node_modules/* | sort -hr

This issue does not seem to follow the issue template. Make sure you provide all the required information.
Have you tried npm install firebase-tools --only=prod
? That will exclude the dev dependencies.
@yuchenshi the --only=prod
will exclude all dev dependencies of the project.
That's what npm install
should be doing anyway. It's because of the shrinkwrap file (I think) that it's installing the dev dependencies as well. To use the CLI (or the CLI as a module), the dev dependencies aren't required in the slightest.
npm actually has an open issue discussing this, though it's not exactly active. Maybe worth someone from our side tilting at npm to see if it can be addressed.
(but, unfortunately, outside some really, really hacky stuff on our end, this is really an npm issue)
https://github.com/npm/cli/issues/4323 is the issue I should have linked. That's the one with actual activity.
Perhaps it would be possible to have a prepublishOnly
script that strips the dev
dependencies from npm-shrinkwrap.json as a workaround?
@haines for my projects (PostCSS, Browserslist) I use clean-publish
to cut development configs during the release.
@xr0master For reproducibility, may I suggest you add to the description the way you installed firebase-tools
.
I am using
yarn global add --ignore-optional firebase-tools@${FIREBASE_TOOLS_VERSION} \
&& yarn cache clean
..within a Dockerfile, and it provides no problems (node_modules/*
is 99.8MB). I think the official guidance was using yarn at the time I have read it.
@akauppi npm i firebase-tools --save-dev
I gave up waiting for npm to fix their issues and am using clean-publish
to do this now. So, thanks for the tip to that @ai (nice username)
Fixed by #5023
before
after
Still a bit thick, but 4 times smaller! Great job, thanks a lot @bkendall.
GASP! I had the thought of "I wonder what's bloating that so" and discovered that googleapis
is listed as a dependency but really is a dev dependency... and it's 111MB.