title: I get "TypeError: Cannot read property 'tag' of null" but only in the packaged version of my discord.js bot
body: <p>I am working on a discord bot in discord.js and everything has been working just fine. But I want to compile it into a .exe file for ease of use, etc. I can run the bot fine just using node.js but when I run the .exe I get the following error message:</p>
  <pre><code>(node:3656) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'tag' of null
      at Client.&lt;anonymous&gt; (C:\snapshot\src\index.js:19:42)
      at Client.emit (events.js:315:20)
      at WebSocketManager.triggerClientReady (C:\snapshot\src\node_modules\discord.js\src\client\websocket\WebSocketManager.js:431:17)
      at WebSocketManager.checkShardsReady (C:\snapshot\src\node_modules\discord.js\src\client\websocket\WebSocketManager.js:415:10)
      at WebSocketShard.&lt;anonymous&gt; (C:\snapshot\src\node_modules\discord.js\src\client\websocket\WebSocketManager.js:197:14)
      at WebSocketShard.emit (events.js:315:20)
      at WebSocketShard.checkReady (C:\snapshot\src\node_modules\discord.js\src\client\websocket\WebSocketShard.js:475:12)
      at WebSocketShard.onPacket (C:\snapshot\src\node_modules\discord.js\src\client\websocket\WebSocketShard.js:447:16)
      at WebSocketShard.onMessage (C:\snapshot\src\node_modules\discord.js\src\client\websocket\WebSocketShard.js:301:10)
      at WebSocket.onMessage (C:\snapshot\src\node_modules\ws\lib\event-target.js:132:16)
  (Use `jamesinasbot --trace-warnings ...` to show where the warning was created)
  (node:3656) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
  (node:3656) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
  </code></pre>
  <p>This is the line with the issue:
  <code>console.log(`Logged in as ${client.user.tag}.`);</code></p>
  <p>I am not sure why this happens. I have made sure all the dependencies are included, it is in the same directory as index.js, and since it is only saying it can't read the property tag of null it seems to be an issue with variables or something not dependencies. I have tried using --trace-warnings but it doesn't show anything different.</p>
  <p>Any help is appreciated!</p>