We've been tracking for a while an Out of Memory error that seemed to happen from time to time in the build step.
We finally pinpointed the commit. Said commit caused the tsc --alwaysStrict
build to go from 175MB (RAM) to complete the build to 656MB.
That commit only added the googleapis
library to the package.json
and use it like so import { google } from "googleapis";
. Those two changes alone created this spike.
Another thing that we saw is that the inclusion of the library on the package.json
incremented the build by 100MB, however, once we add the import
it goes all the way up to 600MB.
It is important to say that we are only interested in gSheets.
I see a couple options going forward but I do not like any of those:
Is there another way to solve this?
I encountered the same issue, though for me the problem surfaced when running jest unit-tests, even the simplest test would consume up to 1GB of memory and cause our CI machine to crash.
seems like some progress was made and you can now import specific modules from @googleapis
look at: https://github.com/googleapis/google-api-nodejs-client/issues/2187
for example: https://www.npmjs.com/package/@googleapis/drive https://www.npmjs.com/package/@googleapis/calendar
haven't tried it yet, but I hope it will solve the issue.
EDIT: tried using the service-specific packages i mentioned above, and it worked like a charm. give it a try
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With