Fix crash when packages.json couldn't be retrieved.