-
-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error while trying to read the map file #211
Comments
Same issue here |
Same issue here. Were you able to fix it? |
It is simply because the source map file does not exist -- here in the v8-to-istanbul/lib/v8-to-istanbul.js Lines 49 to 53 in 0a44bda
If there is any hint that the file uses source map, it tries to read the source map file. However in many cases it does not exist (e.g. third-party library did not ship source map along with bundled code when packaging), as what happened to you here. To me this is a mistake -- the "missing source map" problem is often out of user's control, and user should not be prevented from collecting coverage because of it. Most of the time the source map is for a third-party library which the user does not care about anyway. If you want a workaround, you can just simply wrap the code in try-catch in your local try {
this.rawSourceMap = this.sources.sourceMap || rcmap = convertSourceMap.fromSource(rawSource) || convertSourceMap.fromMapFileSource(rawSource, this._readFileFromDir.bind(this));
} catch {
this.rawSourceMap = null;
} But apparently this won't work in CI. I think should be patched. @bcoe Could you consider this? I'll be happy to create a pull request for this. |
@rwalle I would consider a patch for this. I think we should warn on the console as well as setting |
finally got back to this. The change is simple enough, but should I add a test? (I guess so.) If the code does |
Hi, I am trying to use the package with playwright version 1.24. I am seeing some console errors while trying to collect the coverage.
I followed the instructions as per https://playwright.dev/docs/api/class-coverage.
Error:
The text was updated successfully, but these errors were encountered: