uibuilder problem on pi

165 views
Skip to first unread message

Colin Law

unread,
Sep 14, 2017, 12:04:38 PM9/14/17
to node...@googlegroups.com
Having got node-red-contrib-uibuilder going on an machine running
Ubuntu I installed it on a pi running raspbian jessie (which is
running node-red already) and setup a flow and uibuilder html, css and
js files as on the other machine. When I restart node-red I see no
problems in the log but in the browser console I see

The resource from
http://192.168.xx.xx:1880/uibuilder/vendor/normalize.css/normalize.css
was blocked due to MIME type mismatch (X-Content-Type-Options:
nosniff).[Learn More] uibuilder

The resource from
http://192.168.xx.xx:1880/uibuilder/vendor/jquery/dist/jquery.min.js
was blocked due to MIME type mismatch (X-Content-Type-Options:
nosniff).[Learn More] uibuilder

Loading failed for the <script> with source
http://192.168.xx.xx:1880/uibuilder/vendor/jquery/dist/jquery.min.js”.
uibuilder:130
ReferenceError: $ is not defined[Learn More]

The ip address is that of the pi. Browser is on another machine.

Not what to do about that.

Node red 0.16.1
node.js 6.11.3
uibuilder 0.3.1
npm 3.10.10

In the log I see
UI Builder - Version 0.3.1 started at /uibuilder
UI Builder - Local file overrides at /home/xxx/.node-red/uibuilder/uibuilder

Colin

Julian Knight

unread,
Sep 14, 2017, 12:40:24 PM9/14/17
to Node-RED
The last error is due to the 2nd error. But not sure what is causing the 1st 2. Need to do some reading. Couple of likely looking posts from a quick Google search but different causes neither of which seem that likely. Might take a day or two before I can look.

Colin Law

unread,
Sep 14, 2017, 4:05:00 PM9/14/17
to node...@googlegroups.com
Googling suggests that error can occur if the file is not found. On
the working machine I see (from .node-red)

$ find . -name normalize.css
./node_modules/node-red-contrib-uibuilder/node_modules/normalize.css
./node_modules/node-red-contrib-uibuilder/node_modules/normalize.css/normalize.css

On the pi I see
$ find . -name normalize.css
./node_modules/normalize.css
./node_modules/normalize.css/normalize.css

Could that be a factor. Both are using npm 3.10.10 so why it has
installed them in different places I don't know.

Colin
> --
> http://nodered.org
>
> Join us on Slack to continue the conversation: http://nodered.org/slack
> ---
> You received this message because you are subscribed to the Google Groups
> "Node-RED" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to node-red+u...@googlegroups.com.
> To post to this group, send email to node...@googlegroups.com.
> Visit this group at https://groups.google.com/group/node-red.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/node-red/7ab3b8c6-d51d-498a-81d1-dbd7db6e1d2a%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Colin Law

unread,
Sep 14, 2017, 4:20:45 PM9/14/17
to node...@googlegroups.com
I copied from the working pc the folders
./node_modules/node-red-contrib-uibuilder/node_modules/normalize.css
and
./node_modules/node-red-contrib-uibuilder/node_modules/jquery
to the same place on the pi and now all is working.

So it seems the problem is that they are in the wrong place for some reason.

Colin

Dave C-J

unread,
Sep 14, 2017, 5:08:00 PM9/14/17
to node...@googlegroups.com
Good old npm. It does try to flatten the directory tree if possible. But not always. I'm never sure when and which way it will go. 
--
Sent from phone.

Julian Knight

unread,
Sep 15, 2017, 3:39:34 AM9/15/17
to Node-RED
Thanks, well spotted - hmm, I'll need to take a look at the code to see if I can handle both cases. The point is that it should work in both cases really as both are valid.

I will add an issue so I don't forget to fix it. Somehow!
Reply all
Reply to author
Forward
0 new messages