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.

reload.js is not found

See original GitHub issue

the reload isn’t working for me, and on checking direct access to the JS URL, the file isn’t being served.

http://localhost:4040/reload/reload.js

I added the file itself directly to my own pubilc/js dir and now things work fine.

any idea why the JS file isn’t automagically being served?

I’m using a vanilla express app setup with the generator so it’s quite confusing.

  debug('using hot reloader');
  var http = require('http');
  var reloadServer = http.createServer(app);
  let delay = 300;
  reload(reloadServer, app, delay);
  reloadServer.listen(app.get('port'), function() {
    console.log("Reload server listening on port " + app.get('port'));
  });

this block ^ also prints out the right port #

confused!

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:2
  • Comments:25 (9 by maintainers)

github_iconTop GitHub Comments

3reactions
EleanorMaocommented, Jul 12, 2016

@alallier I resolved my problem. I had put reload(server, app) before error handlers .

1reaction
alalliercommented, Jul 12, 2016

@EleanorMao It seems we are talking about two different problems here, one being you couldn’t get the sample app to work and second a websocket issue.

Why didn’t the sample app work? Can you provide more details here?

Same for the second comment.

The first step is to see why you can’t run the sample app and then worry about integrating reload later.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Simple javascript reload not working - Stack Overflow
reload () in the function refresh() and using onclick='refresh()' in a button. For some reason the page is not reloading. The JS function:...
Read more >
location.reload() - Web APIs | MDN
The location.reload() method reloads the current URL, like the Refresh button. The reload may be blocked and a SECURITY_ERROR DOMException ...
Read more >
Why Javascript location.reload does not work?
It could be that the reload somehow reloaded the cached version of the page. In that case, you can force it to reload...
Read more >
reload - npm
Node.js module to refresh and reload your code in your browser when your code changes. No browser plugins required.. Latest version: 3.2.0, ...
Read more >
Location Reload Method: How to Reload a Page in JavaScript
Optional parameters force reload is a boolean value, which if set to: True reloads the page from the server (e.g. does not store...
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