Skip to content

ReferenceError when using RequireJS #28

Open

Description

@jjoekoullas

source-map-support doesn't install a global when using RequireJS - this causes client.js to throw a ReferenceError: sourceMapSupport is not defined.

Activity

  1. dougouk commented on Mar 10, 2020

    @dougouk

    I have the same issue.

  2. SamuelT-Beslogic commented on Jan 14, 2022

    @SamuelT-Beslogic

    Temporary workaround using patch-package:
    patches/karma-source-map-support+1.4.0.patch

    diff --git a/node_modules/karma-source-map-support/lib/client.js b/node_modules/karma-source-map-support/lib/client.js
    index c28d40b..5e28218 100644
    --- a/node_modules/karma-source-map-support/lib/client.js
    +++ b/node_modules/karma-source-map-support/lib/client.js
    @@ -1 +1,2 @@
    -sourceMapSupport.install();
    +// https://github.com/tschaub/karma-source-map-support/issues/28
    +if (typeof sourceMapSupport  !== 'undefined') sourceMapSupport.install();
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions