diff --git a/MIGRATION.md b/MIGRATION.md index d3f2047deb27..fe0336d2d1f6 100644 --- a/MIGRATION.md +++ b/MIGRATION.md @@ -66,7 +66,9 @@ If you are using the `Hub` right now, see the following table on how to migrate ## Deprecate `client.setupIntegrations()` -Instead, use the new `client.init()` method. You should probably not use this directly and instead use `Sentry.init()`, which calls this under the hood. But if you have a special use case that requires that, you can call `client.init()` instead now. +Instead, use the new `client.init()` method. You should probably not use this directly and instead use `Sentry.init()`, +which calls this under the hood. But if you have a special use case that requires that, you can call `client.init()` +instead now. ## Deprecate `scope.getSpan()` and `scope.setSpan()` diff --git a/packages/node/src/module.ts b/packages/node/src/module.ts index 58ff1be405c2..d873bf9b2f2e 100644 --- a/packages/node/src/module.ts +++ b/packages/node/src/module.ts @@ -10,7 +10,7 @@ function normalizeWindowsPath(path: string): string { /** Creates a function that gets the module name from a filename */ export function createGetModuleFromFilename( - basePath: string = dirname(process.argv[1]), + basePath: string = process.argv[1] ? dirname(process.argv[1]) : process.cwd(), isWindows: boolean = sep === '\\', ): (filename: string | undefined) => string | undefined { const normalizedBase = isWindows ? normalizeWindowsPath(basePath) : basePath;