question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Activating source-map-support several times leads to issues

See original GitHub issue

I’ve just encountered the fact that Protractor tests in TypeScript run via ts-node leads to broken stack traces, as both Protractor and ts-node call require('source-map-support').install() by default. See this issue at ts-node and this example repo.

In this case, the solution is simple, as Protactor allows to switch off source map support, but it would be worth to either investigate this bug or log an error message to notify the user that souce-map-support was activated twice.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:4
  • Comments:6

github_iconTop GitHub Comments

1reaction
LinusUcommented, Jan 16, 2018

Maybe it would be good to guard against double initialisation with a simple global variable? Would you be up for making a pr?

0reactions
krzkaczorcommented, Mar 21, 2021

This library already detects if a particular version is loaded multiple times. If you use yarn you can force it to always install only one version.

In package.json:

"resolutions": {
    "source-map-support": "0.5.19"
  }

This is a quite reasonable workaround IMO.

Read more comments on GitHub >

github_iconTop Results From Across the Web

node-source-map-support - Bountysource
Created 3 years ago in evanw/node-source-map-support with 1 comments. I do get an 'Uncaught ReferenceError: process is not defined' error in Chrome since ......
Read more >
Configuring Sentry with JavaScript Source Maps
An epic troubleshooting tale to enable JavaScript source map fetching in Sentry.
Read more >
How to use source maps in AWS Lambda with Node.js
You enable source maps with a few configuration lines or with a build flag. ... Enabling the native source map support for Node...
Read more >
Source maps in Node.js. Supporting the many flavors of…
Due to this, accurate coverage reports could not be provided. ... Turning on source-map support on for a single run of an npm...
Read more >
How to fix Jupyter extension activation failed when opening ...
I had this same issue and finally got it fixed! If you are on an Linux and are using an Arch-based distro with...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found