Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions packages/nestjs-trpc/lib/scanners/file.scanner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,13 @@ export class FileScanner {
if (jsFilePath == null) {
throw new Error(`Could not find caller file: ${caller}`);
}
const sourceMap = this.getSourceMapFromJSPath(jsFilePath);

return this.normalizePath(
path.resolve(jsFilePath, '..', sourceMap.sources[0]),
);
if (typeof Bun !== "undefined") {
return jsFilePath
} else {
const sourceMap = this.getSourceMapFromJSPath(jsFilePath);
return this.normalizePath(path.resolve(jsFilePath, '..', sourceMap.sources[0]));
}
}

private normalizePath(p: string): string {
Expand Down