6

I'm trying to install BarbaJS with a JS bundler for my GitHub-hosted website. Using CDN, I include a line that installs BarbaJS but when I open the website I get a source map error:

Source map error: Error: request failed with status 404 Resource URL: https://cdn.jsdelivr.net/npm/@barba/core@2.9.7 Source Map URL: barba.umd.js.map

Their documentation doesn't seem to mention this error.

Here is my script tag that installs the library:

<script src="https://cdn.jsdelivr.net/npm/@barba/core@2.9.7"></script>
Pedro Mutter
  • 1,178
  • 1
  • 13
  • 18
lam-sauce
  • 61
  • 1
  • 1
  • 2

1 Answers1

7
<script type="javascript" src="https://cdn.jsdelivr.net/npm/@barba/core@2.9.7"></script>

Adding the type made it work for me.

beskgar
  • 355
  • 3
  • 10
  • Thanks! I had this error: Source map error: Error: "request failed with status 404 Resource URL: http://cdn.jsdelivr.net/npm/less Source Map URL: less.min.js.map" Your method fixed it. – Hiebs915 Dec 08 '20 at 21:51
  • 8
    In my case, adding type="javascript" stopped the script file to be loaded and did not solve the issue – Paul Godard Mar 20 '22 at 15:18