Skip to content

node_modules/@cspotcode/source-map-support/browser-source-map-support.js does not match any file. #30

Closed
@samal-rasmussen

Description

@samal-rasmussen

I suddenly started getting these errors after updating the packages in my project:

node_modules/@cspotcode/source-map-support/browser-source-map-support.js does not match any file.
...
ReferenceError: sourceMapSupport is not defined
      at node_modules/karma-source-map-support/lib/client.js:1:1

I went into node_modules/karma-source-map-support/lib/index.js and added console.log('smsPath ' + smsPath); and ran my tests again it printed out smsPath <snip>node_modules/@cspotcode/source-map-support. I then went into my lock file and saw that ts-node was depending on @cspotcode/source-map-support. I then realized that I was running karma under ts-node using ts-node node_modules/karma/bin/karma start karma.conf.js. I changed this to node node_modules/karma/bin/karma start karma.conf.js and now it prints out smsPath <snip>node_modules/source-map-support and I can run my tests again without error.

@cspotcode/source-map-support is a rather new package, so it makes sense that this just started recently. But it means that the import code in karma-source-map-support needs to be made more robust in order to account for both the @cspotcode/source-map-support and the source-map-support packages existing now.

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