Required for upgrading to node v10: https://github.com/mapnik/node-mapnik/blob/master/CHANGELOG.md#400
According to https://github.com/mapnik/node-mapnik#source-build, building from source requires a mapnik version at least as recent as the mapnik version specified in node-mapnik's package.json. mapnik 3.0.21 should therefore work for node-mapnik 4.0.0 or 4.0.1, but not for 4.0.2. But we'll need to ask someone to backport mapnik 3.0.21 for Stretch and put it in the Wikimedia apt repo, just as we did for 3.0.20 to support node-mapnik 3.7.x.
Of course upgrading means we'll have to bump a bunch of other dependencies for agreement on node-mapnik v4, too.