Here is a cleaner version if you encounter problems.
Still not working %100, randomly works.
As on some steamcommunity versions, that method would cause a crash.
if (this._options.request) {
return reject(new Error('SteamCommunity.login() is incompatible with node-steamcommunity v3\'s usage of \'request\'. If you need to specify a custom \'request\' instance (e.g. when using a proxy), use https://www.npmjs.com/package/steam-session directly to log onto Steam.'));
}
const SteamCommunity = require('steamcommunity');
const community = new SteamCommunity();
// Patch before confirmations — login doesn't use this.request
community.request = community.request.defaults({
headers: {
'Accept-Encoding': 'gzip, deflate, br'
}
});