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.

Path not found for reload

See original GitHub issue

I’ve started a node.js and express.js project and installed reload but I can’t get the path for the script to work correctly.

`var server = http.createServer(app);

reload(server, app);`

that’s in my www.js file.

when I try to point to the endpoint /reload/reload.js, I get a 404 error message

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:24 (15 by maintainers)

github_iconTop GitHub Comments

2reactions
peterwilliscommented, Mar 22, 2017

For anyone else interested I got it working like this in version 1.1.1:

In my routing before the error handling:

app.get('/reloader', (req, res) => {
  res.type('text/javascript')
  res.sendFile(require.resolve('reload/lib/reload-client'))
});

On every page:

<script src="/reloader"></script>

When the app is served:

var server = http.createServer(app);
var reload = require('reload');
reload(server, {get: () => true});
1reaction
100000001commented, Mar 4, 2017

@spikyjt Can confirm, I had the above problem in a vanilla express project and after commenting the 404 route reload.js loads.

/*// catch 404 and forward to error handler app.use(function(req, res, next) { var err = new Error('Not Found'); err.status = 404; next(err); }); */

Read more comments on GitHub >

github_iconTop Results From Across the Web

Url Not found on reload + Angular5 - apache - Stack Overflow
I am facing one issue related to the angular app, using components in my app then when I go with the single page...
Read more >
NotFound route causes reload #23100 - dotnet/aspnetcore
Hi! When using Blazor wasm, the not found route causes browser page reload, happens even in the clear visual studio template. To Reproduce....
Read more >
Fixing the 'cannot GET /URL' error on refresh with React ...
In this post you'll learn how to fix the 'cannot GET /URL' error with React Router. Along the way, you'll also learn how...
Read more >
"Linked document [path]/[filename].rvt not found. The link will ...
When trying to open a cloud workshared model or reload a linked RVT model from BIM 360/Docs in Revit, the following error message...
Read more >
Xrefs are Missing or Not Loading When You Open Your Drawing
Causes. Missing Xrefs can have several possible causes, including: An incorrect Xref path; Nested Xrefs (that is, Xrefs within your Xrefs) ...
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