bartbutenaers / node-red-contrib-ui-svg

A Node-RED widget node to show interactive SVG (vector graphics) in the dashboard
Apache License 2.0
93 stars 27 forks source link

TypeError: Cannot read property 'push' of undefined on every example #68

Closed pepedros closed 4 years ago

pepedros commented 4 years ago

Fresh installation of Node-Red v1.1.3 Dashboard v2.23.2 Nodejs v12.18.3 ui-svg v2.0.2

When i try to import examples or code from wiki, I always get an error: msg : error "TypeError: Cannot read property 'push' of undefined"

and "svg" tab in dashboard doesn't appear ui-svg

bartbutenaers commented 4 years ago

Hi Kamil, Have imported the HMI demo in: Node-RED version: v1.1.2 Node.js version: v12.18.3 Dashboard 2.23.0

And that works without problems...

Can you:

Problem is that it works here fine, so it is like looking for a needle in a haystack ... Bart

pepedros commented 4 years ago

I have in logs:

{ Error: Cannot find module 'node-red-dashboard'
    at Object.requireModule [as require] (/usr/lib/node_modules/node-red/node_modules/@node-red/registry/lib/util.js:48:19)
    at new SvgGraphicsNode (/home/pi/.node-red/node_modules/node-red-contrib-ui-svg/svg_graphics.js:211:26)
    at Object.createNode (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/flows/util.js:493:31)
    at Flow.start (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/flows/Flow.js:193:48)
    at start (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/flows/index.js:345:33)
    at stop.then.then (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/flows/index.js:212:21)
    at process._tickCallback (internal/process/next_tick.js:68:7) code: 'MODULE_NOT_FOUND' }
15 Aug 22:56:38 - [error] [ui_svg_graphics:c2f0e76f.a25478] TypeError: Cannot read property 'push' of undefined

Its strange, because I have node-red-dashboard installed and other nodes works correctly

image

bartbutenaers commented 4 years ago

That is indeed strange. I see here that they solved it by restarting Node-RED. Could you please do that and let me know...

pepedros commented 4 years ago

I have restarted machine and everything is working fine. Thanks.

bartbutenaers commented 4 years ago

Ok, you are welcome!

chrisn-au commented 3 years ago

I had the same problem - issue occurred for me if I installed the dashboard nodes after SVG and did not restart

bartbutenaers commented 3 years ago

Hi @chrisn-au, Thanks for the feedback! For completeness: and once you restart, everything is solved I assume/hope?

chrisn-au commented 3 years ago

Yep thanks, a restart of the container and all worked perfectly. (I really need to update my base docker image to include the dashboard).

I just need to understand how to get a base image clickable without knowing a selector but that's a case of RTM and playing

Thanks for an awesome module

Vipin3832 commented 3 years ago

× TypeError: Cannot read property 'push' of undefined what are resion push method are undefine

Vipin3832 commented 3 years ago

i am also facing this problem can any one help me

bartbutenaers commented 3 years ago

Hi @Vipin3832, That is not enough information to allow me to help you. Please give some more detail: on which system do you run Node-RED, did the dashboard work before you have used the SVG node , are there errors in the log, and so on ... Bart