I tried to npm install graphoid today and it failed because it was requesting old binaries of canvas builds from a secondary library that are no longer online and return a 404 :(.
I have no idea why this isn't falling over in prod, maybe we've cached it :). Anyway canvas 2+ includes these binaries in the main repo and no longer requires on the deprecated library canvas-prebuilt.
npm i canvas@1.6.5 > canvas-prebuilt@1.6.11 install /home/marielle/code/graphoid/node_modules/canvas-prebuilt > node-pre-gyp install node-pre-gyp WARN Using request for node-pre-gyp https download node-pre-gyp ERR! install error node-pre-gyp ERR! stack Error: 404 status code downloading tarball https://github.com/chearon/node-canvas-prebuilt/releases/download/v1.6.11/canvas-prebuilt-v1.6.11-node-v67-linux-x64.tar.gz node-pre-gyp ERR! stack at Request.<anonymous> (/home/marielle/code/graphoid/node_modules/node-pre-gyp/lib/install.js:137:27) node-pre-gyp ERR! stack at Request.emit (events.js:187:15) node-pre-gyp ERR! stack at Request.onRequestResponse (/home/marielle/code/graphoid/node_modules/request/request.js:1074:10) node-pre-gyp ERR! stack at ClientRequest.emit (events.js:182:13) node-pre-gyp ERR! stack at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:562:21) node-pre-gyp ERR! stack at HTTPParser.parserOnHeadersComplete (_http_common.js:109:17) node-pre-gyp ERR! stack at TLSSocket.socketOnData (_http_client.js:449:20) node-pre-gyp ERR! stack at TLSSocket.emit (events.js:182:13) node-pre-gyp ERR! stack at addChunk (_stream_readable.js:283:12) node-pre-gyp ERR! stack at readableAddChunk (_stream_readable.js:264:11) node-pre-gyp ERR! System Linux 4.9.0-11-amd64 node-pre-gyp ERR! command "/home/marielle/.nvm/versions/node/v11.0.0/bin/node" "/home/marielle/code/graphoid/node_modules/.bin/node-pre-gyp" "install" node-pre-gyp ERR! cwd /home/marielle/code/graphoid/node_modules/canvas-prebuilt node-pre-gyp ERR! node -v v11.0.0 node-pre-gyp ERR! node-pre-gyp -v v0.10.3 node-pre-gyp ERR! not ok 404 status code downloading tarball https://github.com/chearon/node-canvas-prebuilt/releases/download/v1.6.11/canvas-prebuilt-v1.6.11-node-v67-linux-x64.tar.gz > canvas@1.6.5 install /home/marielle/code/graphoid/node_modules/canvas > node-gyp rebuild ./util/has_lib.sh: 31: ./util/has_lib.sh: pkg-config: not found gyp: Call to './util/has_lib.sh freetype' returned exit status 0 while in binding.gyp. while trying to load binding.gyp gyp ERR! configure error gyp ERR! stack Error: `gyp` failed with exit code: 1 gyp ERR! stack at ChildProcess.onCpExit (/home/marielle/.nvm/versions/node/v11.0.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16) gyp ERR! stack at ChildProcess.emit (events.js:182:13) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12) gyp ERR! System Linux 4.9.0-11-amd64 gyp ERR! command "/home/marielle/.nvm/versions/node/v11.0.0/bin/node" "/home/marielle/.nvm/versions/node/v11.0.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /home/marielle/code/graphoid/node_modules/canvas gyp ERR! node -v v11.0.0 gyp ERR! node-gyp -v v5.0.5 gyp ERR! not ok npm WARN ajv-keywords@2.1.1 requires a peer of ajv@^5.0.0 but none is installed. You must install peer dependencies yourself. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: canvas-prebuilt@1.6.11 (node_modules/canvas-prebuilt): npm WARN optional SKIPPING OPTIONAL DEPENDENCY: canvas-prebuilt@1.6.11 install: `node-pre-gyp install` npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1 npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! canvas@1.6.5 install: `node-gyp rebuild` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the canvas@1.6.5 install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.