diff --git a/src/index.ts b/src/index.ts index 9f720f0f6..719a3e88d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -793,7 +793,9 @@ export function create(rawOptions: CreateOptions = {}): Service { // Install source map support and read from memory cache. installSourceMapSupport(); function installSourceMapSupport() { - (require('@cspotcode/source-map-support') as typeof _sourceMapSupport).install({ + const sourceMapSupport = + require('@cspotcode/source-map-support') as typeof _sourceMapSupport; + sourceMapSupport.install({ environment: 'node', retrieveFile(pathOrUrl: string) { let path = pathOrUrl;