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.

Reference to nonexistent source map in compiled output

See original GitHub issue

Do you want to request a feature or report a bug? Bug

What is the current behavior? I am using source-map-loader in my webpack configuration. When I load pusher via webpack, I get a warning that a source map failed to be parsed:

WARNING in ./node_modules/pusher-js/dist/web/pusher-with-encryption.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/Users/dev/projects/syrup/node_modules/pusher-js/dist/web/utf8.js.map' file: Error: ENOENT: no such file or directory, open '/Users/dev/projects/syrup/node_modules/pusher-js/dist/web/utf8.js.map'
Error: Failed to parse source map from '/Users/dev/projects/syrup/node_modules/pusher-js/dist/web/utf8.js.map' file: Error: ENOENT: no such file or directory, open '/Users/dev/projects/syrup/node_modules/pusher-js/dist/web/utf8.js.
map'
    at fetchFromFilesystem (/Users/dev/projects/syrup/node_modules/source-map-loader/dist/utils.js:131:11)
    at async fetchFromURL (/Users/dev/projects/syrup/node_modules/source-map-loader/dist/utils.js:232:21)
    at async Object.loader (/Users/dev/projects/syrup/node_modules/source-map-loader/dist/index.js:69:9)
ℹ 「wdm」: Compiled with warnings.

This is because there is a source map comment left over in dist/web/pusher.js that appears to have been copied over from a third-party library that points to a file that is not present in dist/.

https://github.com/pusher/pusher-js/blob/8e57f4ec606901a17f98941f3a2273b80eff7bea/dist/web/pusher.js#L546

What is the expected behavior? Source map comments should be stripped out when possible if they are no longer accurate.

Which versions of Pusher, and which browsers / OS are affected by this issue? Did this work in previous versions of Pusher? If so, which?

  • pusher-js 7.0.3
  • webpack 4.46.0
  • source-map-loader 1.1.3

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:14 (5 by maintainers)

github_iconTop GitHub Comments

4reactions
simonbowencommented, Dec 16, 2021

We’re getting the same problem.

1reaction
stale[bot]commented, Jun 6, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you’d like this issue to stay open please leave a comment indicating how this issue is affecting you. Thank you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Source maps reference non existent source file - Stack Overflow
This error is caused by the Kendo UI module's source map referencing a relative path that does not exist. Here is a snippet...
Read more >
Source maps don't work when attaching to running code #936
Attaching with vscode and sourceMaps: true , it displays the actual file dist/some-test.js which contains inlined source, and breaks on the ...
Read more >
4 Reasons Why Your Source Maps are Broken - Sentry Blog
4 Reasons Why Your Source Maps are Broken · Missing or incorrect source map directive · Missing original source files · Bad source...
Read more >
Getting started with CSS sourcemaps and in-browser Sass ...
CSS sourcemaps allow the browser to map CSS generated by a pre-processor, such as Sass, back to the original source file, including exactly ......
Read more >
Compiler Options - ClojureScript
Provides fine grained control over the sourceMappingURL comment that is appended to generated JavaScript files when source mapping is enabled. : ...
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