fix: translation bundler logic (#22459)
* fix logic in translationBundler * remove tsnode
This commit is contained in:
1 parent
dfe997dce2
commit
66397a6626
3 files changed
+2
-42
No files matched your search
@@ -5,7 +5,7 @@ import path from "path";
|
||||
import { CALCOM_VERSION } from "@calcom/lib/constants";
|
||||
|
||||
function findMonorepoRoot(): string {
|
||||
let currentDir = __dirname;
|
||||
let currentDir = process.cwd();
|
||||
while (currentDir !== path.dirname(currentDir)) {
|
||||
try {
|
||||
const packageJsonPath = path.join(currentDir, "package.json");
|
||||
@@ -20,7 +20,7 @@ function findMonorepoRoot(): string {
|
||||
currentDir = path.dirname(currentDir);
|
||||
}
|
||||
|
||||
throw new Error("Could not find monorepo root - repository structure may be corrupted");
|
||||
return process.cwd();
|
||||
}
|
||||
|
||||
const LOCALES_PATH = path.join(findMonorepoRoot(), "packages/lib/server/locales");
|
||||
|
||||
Reference in new issue
Block a user