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.

Invalid source map

See original GitHub issue

Bug report

Describe the bug

sources refers to a file that’s not in the distribution

{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,kBAAkB,CAAA;AAG7C,cAAc,qBAAqB,CAAA;AACnC,cAAc,uBAAuB,CAAA;AAErC;;GAEG;AACH,MAAM,YAAY,GAAG,CACnB,WAAmB,EACnB,WAAmB,EACnB,OAA+B,EAC/B,EAAE;IACF,OAAO,IAAI,cAAc,CAAC,WAAW,EAAE,WAAW,EAAE,OAAO,CAAC,CAAA;AAC9D,CAAC,CAAA;AAED,OAAO,EACL,YAAY,EACZ,cAAc,GAKf,CAAA"}

To Reproduce

npm install --save @supabase/supabase-js
 cat node_modules/@supabase/supabase-js/dist/module/index.js.map 

Expected behavior

I’m not a source map expert, so I’m not quite sure the best way to fix this. I think you’d either want to distribute the source in the npm package or inline it to the sourcemap

Additional context

I don’t use Supabase, but work on SvelteKit and users are reporting issues that seem to be caused by trying to load this file that doesn’t exist. https://github.com/sveltejs/kit/issues/673#issuecomment-807203786

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
kiwicopplecommented, Apr 14, 2021

🎉 This issue has been resolved in version 1.11.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

1reaction
kiwicopplecommented, Apr 14, 2021

🎉 This issue has been resolved in version 1.11.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Read more comments on GitHub >

github_iconTop Results From Across the Web

Source map error: Error: Invalid URL how to fix it?
It's used to prevent source file path collisions in sourcemaps when loading multiple libraries built with webpack.
Read more >
Source map errors — Firefox Source Docs documentation
Invalid source map ¶. The source map data can be invalid — either not a JSON file at all, or with an incorrect...
Read more >
Invalid source maps when building with optimization #7039
All files must generate sourceMap when optimization is true. Steps to Reproduce. Setup a new workspace with npx create-nx-workspace --preset= ...
Read more >
Source map error: Error: Invalid URL: - Netlify Integration
Hey there I keep getting this error Source map error: Error: Invalid URL: webpack://[name]/./src/autocomplete-theme-classic.scss Resource ...
Read more >
https://web2.qatar.cmu.edu/~liginlal/angular/my-ap...
{"version":3,"file":"invalid-source-map.js","sources":["../invalid-source-map.txt"],"mappings":"AAAA"}"}
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