Skip to content
This repository has been archived by the owner on Aug 10, 2024. It is now read-only.

404 error on heatmap.min.js when ui path is / #3

Closed
maditnerd opened this issue Aug 17, 2019 · 4 comments
Closed

404 error on heatmap.min.js when ui path is / #3

maditnerd opened this issue Aug 17, 2019 · 4 comments

Comments

@maditnerd
Copy link

Got a 404 error on heatmap.min.js

settings.js

ui: { path: "/" }

Change this line to make a quick (but dirty fix)

RED.httpNode.get('/heatmap/js/*', function(req, res){
        var options = {
            root: __dirname + '/lib/',
            dotfiles: 'deny'
        };

I'll try to find a better way to make it works, when I understand a bit more how node-red works.

@bartbutenaers
Copy link
Owner

Hi Rémy,

Sorry for the delay!

When I was developing this node, we had a discussion about this kind of issues on the Node-RED forum.

Normally this line is in comment in the settings.js file:

// If you installed the optional node-red-dashboard you can set it's path
// relative to httpRoot
//ui: { path: "ui" },

But users can uncomment it, and change the path (which I need to use in my node!). Since you have uncommented it and set it to /, it indeed won't work (since I end up with 3 slashes in sequence ///heatmap/js/*)

Just out of curiosity: is there any reason why your path contains only / ?

I will try to create a fix this week. Would be nice if you could test it ...

Kind regards,
Bart

@bartbutenaers
Copy link
Owner

Hi Rémy (@maditnerd),

I have fixed this on Github.
You can install this version from Github directly (in your Node-RED folder):

npm install bartbutenaers/node-red-contrib-ui-heatmap

Would be nice if you could test whether it works now.
If it is OK, I will publish it on NPM.

Thanks!
Bart

@maditnerd
Copy link
Author

It works! Thanks a lot for the fix 👍

@bartbutenaers
Copy link
Owner

Version 2.1.1 has been published on NPM...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants