Avoid an unhandled error when `dependencies` is missing from `package.json` during closure serialization. Fixes #16076