We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7201203 commit cdad6afCopy full SHA for cdad6af
packages/auth-services/src/login-server/src/app.ts
@@ -2,8 +2,9 @@ import express, { Express } from 'express';
2
import cors from 'cors';
3
import { OAuth2Client } from 'google-auth-library';
4
import path from 'node:path';
5
+import { fileURLToPath } from 'node:url';
6
// Prefer Node's CJS globals when available; fallback to process.cwd()
-const resolvedDirname = typeof __dirname !== 'undefined' ? __dirname : process.cwd();
7
+const resolvedDirname = path.dirname(fileURLToPath(import.meta.url));
8
9
type DiscordTokenResponse = {
10
access_token?: string;
0 commit comments