Just completed/troubleshooted this challenge, hopefully FCC can update its code block in the tutorial to {upsert: true, returnDocument: ‘after’} (returnOriginal is deprecated) . In addition, username: profile.displayName || profile.username should be used instead of name: profile.displayName || 'John Doe', because
in the previous challenge “How to Put a Profile Together”, {username: req.user.username} was used in the argument for res.render for /profile
profile.username has a value in the profile returned from Github.