macOS Big Sur: error installing puppeteer with EFBIG: file too large, write

Viewed 1025

Anyone else seeing this of find a way around it???

➜ npm install puppeteer -g

> puppeteer@5.4.1 install /Users/afitzgerald/.nvm/versions/node/v12.19.0/lib/node_modules/puppeteer
> node install.js

Downloading Chromium r809590 - 131.1 Mb [===============     ] 74% 0.7s ERROR: Failed to set up Chromium r809590! Set "PUPPETEER_SKIP_DOWNLOAD" env variable to skip download.
[Error: EFBIG: file too large, write] {
  errno: -27,
  code: 'EFBIG',
  syscall: 'write'
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! puppeteer@5.4.1 install: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the puppeteer@5.4.1 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!     /Users/afitzgerald/.npm/_logs/2020-11-13T18_32_58_543Z-debug.log

dubug log doesn't contain anything else useful...

1 Answers

Looks like the OS is complaining that the file is too big. If there is a limit on Maximum size of core files created or Maximum size of files created by the shell you should try changing it with ulimit -c 2097152 or ulimit -f 2097152 which will set the limit to 2 GB (2097152 kB = 2 GB). Puppeteer downloads are usually under 1 GB.

Limits exist to make sure files don't get too big you can see these limits by running in the terminal. Look at the output below.

$ ulimit -a
Maximum size of core files created                           (kB, -c) 0
Maximum size of a process’s data segment                     (kB, -d) unlimited
Maximum size of files created by the shell                   (kB, -f) unlimited
Maximum size that may be locked into memory                  (kB, -l) unlimited
Maximum resident set size                                    (kB, -m) unlimited
Maximum number of open file descriptors                          (-n) 1048576
Maximum stack size                                           (kB, -s) 8192
Maximum amount of cpu time in seconds                   (seconds, -t) unlimited
Maximum number of processes available to a single user           (-u) 5568
Maximum amount of virtual memory available to the shell      (kB, -v) unlimited
Related