diff options
-rw-r--r-- | server/controllers/tracker.ts | 2 | ||||
-rw-r--r-- | server/helpers/core-utils.ts | 5 | ||||
-rw-r--r-- | tsconfig.json | 2 |
3 files changed, 5 insertions, 4 deletions
diff --git a/server/controllers/tracker.ts b/server/controllers/tracker.ts index da9c68c6c..6d60639b8 100644 --- a/server/controllers/tracker.ts +++ b/server/controllers/tracker.ts | |||
@@ -2,7 +2,7 @@ import { Server as TrackerServer } from 'bittorrent-tracker' | |||
2 | import express from 'express' | 2 | import express from 'express' |
3 | import { createServer } from 'http' | 3 | import { createServer } from 'http' |
4 | import proxyAddr from 'proxy-addr' | 4 | import proxyAddr from 'proxy-addr' |
5 | import { Server as WebSocketServer } from 'ws' | 5 | import { WebSocketServer } from 'ws' |
6 | import { Redis } from '@server/lib/redis' | 6 | import { Redis } from '@server/lib/redis' |
7 | import { logger } from '../helpers/logger' | 7 | import { logger } from '../helpers/logger' |
8 | import { CONFIG } from '../initializers/config' | 8 | import { CONFIG } from '../initializers/config' |
diff --git a/server/helpers/core-utils.ts b/server/helpers/core-utils.ts index 7f28cfc8b..2cbf0f8fe 100644 --- a/server/helpers/core-utils.ts +++ b/server/helpers/core-utils.ts | |||
@@ -164,9 +164,10 @@ let rootPath: string | |||
164 | function root () { | 164 | function root () { |
165 | if (rootPath) return rootPath | 165 | if (rootPath) return rootPath |
166 | 166 | ||
167 | // We are in /helpers/utils.js | 167 | rootPath = __dirname |
168 | rootPath = join(__dirname, '..', '..') | ||
169 | 168 | ||
169 | if (basename(rootPath) === 'helpers') rootPath = resolve(rootPath, '..') | ||
170 | if (basename(rootPath) === 'server') rootPath = resolve(rootPath, '..') | ||
170 | if (basename(rootPath) === 'dist') rootPath = resolve(rootPath, '..') | 171 | if (basename(rootPath) === 'dist') rootPath = resolve(rootPath, '..') |
171 | 172 | ||
172 | return rootPath | 173 | return rootPath |
diff --git a/tsconfig.json b/tsconfig.json index ada13dc98..075a3d86e 100644 --- a/tsconfig.json +++ b/tsconfig.json | |||
@@ -10,6 +10,7 @@ | |||
10 | "removeComments": true, | 10 | "removeComments": true, |
11 | "strictBindCallApply": true, | 11 | "strictBindCallApply": true, |
12 | "esModuleInterop": true, | 12 | "esModuleInterop": true, |
13 | "forceConsistentCasingInFileNames": true, | ||
13 | "outDir": "./dist", | 14 | "outDir": "./dist", |
14 | "lib": [ | 15 | "lib": [ |
15 | "dom", | 16 | "dom", |
@@ -20,7 +21,6 @@ | |||
20 | "es2019" | 21 | "es2019" |
21 | ], | 22 | ], |
22 | "typeRoots": [ | 23 | "typeRoots": [ |
23 | "node_modules/sitemap/node_modules/@types", | ||
24 | "node_modules/@types", | 24 | "node_modules/@types", |
25 | "server/typings" | 25 | "server/typings" |
26 | ], | 26 | ], |