JS doesn't work on localhost

  • Hi,

    I'm having trouble with a very simple JS on localhost. The problem is that it works in Vivaldi when I open the html file itself, as well as in Chrome on localhost.
    I'm using Vivaldi 1.8 (Stable) for Windows.

    Any idea why this could be happening?

  • Moderator

    You have a problem with a local file or your server at
    Did you check the error console in Developer Tools while loading page with F5?

  • When I open the file locally (meaning I doublecklick the .html file), it works. But when I access the same file at, it doesn't (in Vivaldi, that is).

    It the console, it seems it cannot import a .js from another file (when on localhost).

    Uncaught SyntaxError: Unexpected token import
    chordpro.html:10 Uncaught ReferenceError: chordPro is not defined
    at chordpro.html:10
    chordpro.html:1 Error in event handler for (unknown): TypeError: Cannot read property 'success' of undefined
    at chrome-extension://afmkbjoakcacgljcdccofbffloabfbni/scripts/pre.js:13:13


Looks like your connection to Vivaldi Forum was lost, please wait while we try to reconnect.