Skip to content
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

Live reload fails when 1 file changes and that file is a CSS/SCSS with @import #6106

Closed
bep opened this issue Jul 22, 2019 · 1 comment
Closed
Assignees
Milestone

Comments

@bep
Copy link
Member

bep commented Jul 22, 2019

This was an head scratcher for me as I had only 1 site failing to autoreload when I maded changes to a SCSS. This looks like a bug in https://github.com/livereload/livereload-js and you will typically see this in the Chrome console:

Uncaught TypeError: link.getAttribute is not a function
    at Reloader.linkHref (livereload.js?port=1313&mindelay=10&v=2:1744)
    at livereload.js?port=1313&mindelay=10&v=2:1642
    at pickBestMatch (livereload.js?port=1313&mindelay=10&v=2:1421)
    at Reloader.reloadStylesheet (livereload.js?port=1313&mindelay=10&v=2:1642)
    at Reloader.reload (livereload.js?port=1313&mindelay=10&v=2:1499)
    at LiveReload.performReload (livereload.js?port=1313&mindelay=10&v=2:1089)
    at Object.message (livereload.js?port=1313&mindelay=10&v=2:1069)
    at Object.message (livereload.js?port=1313&mindelay=10&v=2:708)
    at Parser.process (livereload.js?port=1313&mindelay=10&v=2:1321)
    at Connector._onmessage (livereload.js?port=1313&mindelay=10&v=2:840)

For the above to happen:

  • You need an @import in your styles
  • The change must only result in 1 changed (CSS) file; else we fall back to a hard browser refresh (and that works fine)
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant