I am trying to use "node-red-contrib-ui-joystick" in node-red, I have node-red installed in windows version 3.0.2 and I get the following error, I hope to receive your help, thanks
How did you do the install of the node?
Which version of nodejs are you using ?
It might be useful if you posted the full startup log. Please copy/paste the text, not screenshot.
in manage palette, which appears in the node-red menu
I am using v12.22.9
Unexpected Node Error
Info:
Node object is not a node-red Node
Stack:
Error: Module not allowed
at Object.requireModule [as require] (/home/ubuntu/.nvm/versions/node/v14.21 .3/lib/node_modules/node-red/node_modules/@node-red/registry/lib/externalModules .js:104:19)
at Object.requireModule [as require] (/home/ubuntu/.nvm/versions/node/v14.21 .3/lib/node_modules/node-red/node_modules/@node-red/registry/lib/util.js:51:45)
at new JoystickNode (/home/ubuntu/.node-red/node_modules/node-red-contrib-ui -joystick/joystick.js:61:26)
at Object.createNode (/home/ubuntu/.nvm/versions/node/v14.21.3/lib/node_modu les/node-red/node_modules/@node-red/runtime/lib/flows/util.js:90:27)
at Flow.start (/home/ubuntu/.nvm/versions/node/v14.21.3/lib/node_modules/nod e-red/node_modules/@node-red/runtime/lib/flows/Flow.js:206:48)
at Object.start [as startFlows] (/home/ubuntu/.nvm/versions/node/v14.21.3/li b/node_modules/node-red/node_modules/@node-red/runtime/lib/flows/index.js:394:33 )
Please report this issue, including the information logged above:
Trace: Error: Module not allowed
at Object.requireModule [as require] (/home/ubuntu/.nvm/versions/node/v14.21 .3/lib/node_modules/node-red/node_modules/@node-red/registry/lib/externalModules .js:104:19)
at Object.requireModule [as require] (/home/ubuntu/.nvm/versions/node/v14.21 .3/lib/node_modules/node-red/node_modules/@node-red/registry/lib/util.js:51:45)
at new JoystickNode (/home/ubuntu/.node-red/node_modules/node-red-contrib-ui -joystick/joystick.js:61:26)
at Object.createNode (/home/ubuntu/.nvm/versions/node/v14.21.3/lib/node_modu les/node-red/node_modules/@node-red/runtime/lib/flows/util.js:90:27)
at Flow.start (/home/ubuntu/.nvm/versions/node/v14.21.3/lib/node_modules/nod e-red/node_modules/@node-red/runtime/lib/flows/Flow.js:206:48)
at Object.start [as startFlows] (/home/ubuntu/.nvm/versions/node/v14.21.3/li b/node_modules/node-red/node_modules/@node-red/runtime/lib/flows/index.js:394:33 ) {
code: 'module_not_allowed'
}
at new JoystickNode (/home/ubuntu/.node-red/node_modules/node-red-contrib-ui -joystick/joystick.js:289:21)
at Object.createNode (/home/ubuntu/.nvm/versions/node/v14.21.3/lib/node_modu les/node-red/node_modules/@node-red/runtime/lib/flows/util.js:90:27)
at Flow.start (/home/ubuntu/.nvm/versions/node/v14.21.3/lib/node_modules/nod e-red/node_modules/@node-red/runtime/lib/flows/Flow.js:206:48)
at Object.start [as startFlows] (/home/ubuntu/.nvm/versions/node/v14.21.3/li b/node_modules/node-red/node_modules/@node-red/runtime/lib/flows/index.js:394:33 )
24 Jun 20:46:48 - [error] [ui_joystick:bbbe5304cd79b3e2] TypeError: Cannot read property 'push' of undefined
That isn't the full startup log. It starts with Welcome to node red.
Node12 doesn’t support the “module” syntax. But I also note those logs mention .nvm. In general we find it’s much harder to support issues on top of version managers as they can cause issues like this. Really it would be better if you could be using a clean install of nodejs 16 or 18
Welcome to Node-RED
24 Jun 21:31:05 - [info] Node-RED version: v3.0.2
24 Jun 21:31:05 - [info] Node.js version: v14.21.3
24 Jun 21:31:05 - [info] Linux 5.19.0-1025-aws x64 LE
24 Jun 21:31:05 - [info] Loading palette nodes
24 Jun 21:31:06 - [info] Dashboard version 1.0.2 started at /ui
24 Jun 21:31:06 - [info] Settings file : /home/ubuntu/.node-red/settings.js
24 Jun 21:31:06 - [info] Context store : 'default' [module=memory]
24 Jun 21:31:06 - [info] User directory : /home/ubuntu/.node-red
24 Jun 21:31:06 - [warn] Projects disabled : editorTheme.projects.enabled=false
24 Jun 21:31:06 - [info] Flows file : /home/ubuntu/.node-red/flows.json
24 Jun 21:31:06 - [warn]
Your flow credentials file is encrypted using a system-generated key.
If the system-generated key is lost for any reason, your credentials
file will not be recoverable, you will have to delete it and re-enter
your credentials.
You should set your own key using the 'credentialSecret' option in
your settings file. Node-RED will then re-encrypt your credentials
file using your chosen key the next time you deploy a change.
24 Jun 21:31:06 - [warn] Encrypted credentials not found
24 Jun 21:31:06 - [info] Server now running at http://127.0.0.1:1880/
24 Jun 21:31:06 - [info] Starting flows
24 Jun 21:31:06 - [info] Started flows
24 Jun 21:33:16 - [info] Stopping flows
24 Jun 21:33:16 - [info] Stopped flows
24 Jun 21:33:16 - [info] Updated flows
24 Jun 21:33:16 - [info] Starting flows
24 Jun 21:33:16 - [error]
Unexpected Node Error
Info:
Node object is not a node-red Node
Stack:
Error: Module not allowed
at Object.requireModule [as require] (/home/ubuntu/.nvm/versions/node/v14.21.3/lib/node_modules/n ode-red/node_modules/@node-red/registry/lib/externalModules.js:104:19)
at Object.requireModule [as require] (/home/ubuntu/.nvm/versions/node/v14.21.3/lib/node_modules/n ode-red/node_modules/@node-red/registry/lib/util.js:51:45)
at new JoystickNode (/home/ubuntu/.node-red/node_modules/node-red-contrib-ui-joystick/joystick.js :61:26)
at Object.createNode (/home/ubuntu/.nvm/versions/node/v14.21.3/lib/node_modules/node-red/node_mod ules/@node-red/runtime/lib/flows/util.js:90:27)
at Flow.start (/home/ubuntu/.nvm/versions/node/v14.21.3/lib/node_modules/node-red/node_modules/@n ode-red/runtime/lib/flows/Flow.js:206:48)
at start (/home/ubuntu/.nvm/versions/node/v14.21.3/lib/node_modules/node-red/node_modules/@node-r ed/runtime/lib/flows/index.js:394:33)
Please report this issue, including the information logged above:
Trace: Error: Module not allowed
at Object.requireModule [as require] (/home/ubuntu/.nvm/versions/node/v14.21.3/lib/node_modules/n ode-red/node_modules/@node-red/registry/lib/externalModules.js:104:19)
at Object.requireModule [as require] (/home/ubuntu/.nvm/versions/node/v14.21.3/lib/node_modules/n ode-red/node_modules/@node-red/registry/lib/util.js:51:45)
at new JoystickNode (/home/ubuntu/.node-red/node_modules/node-red-contrib-ui-joystick/joystick.js :61:26)
at Object.createNode (/home/ubuntu/.nvm/versions/node/v14.21.3/lib/node_modules/node-red/node_mod ules/@node-red/runtime/lib/flows/util.js:90:27)
at Flow.start (/home/ubuntu/.nvm/versions/node/v14.21.3/lib/node_modules/node-red/node_modules/@n ode-red/runtime/lib/flows/Flow.js:206:48)
at start (/home/ubuntu/.nvm/versions/node/v14.21.3/lib/node_modules/node-red/node_modules/@node-r ed/runtime/lib/flows/index.js:394:33) {
code: 'module_not_allowed'
}
at new JoystickNode (/home/ubuntu/.node-red/node_modules/node-red-contrib-ui-joystick/joystick.js :289:21)
at Object.createNode (/home/ubuntu/.nvm/versions/node/v14.21.3/lib/node_modules/node-red/node_mod ules/@node-red/runtime/lib/flows/util.js:90:27)
at Flow.start (/home/ubuntu/.nvm/versions/node/v14.21.3/lib/node_modules/node-red/node_modules/@n ode-red/runtime/lib/flows/Flow.js:206:48)
at start (/home/ubuntu/.nvm/versions/node/v14.21.3/lib/node_modules/node-red/node_modules/@node-r ed/runtime/lib/flows/index.js:394:33)
24 Jun 21:33:16 - [error] [ui_joystick:3d23eca5750225aa] TypeError: Cannot read property 'push' of un defined
24 Jun 21:33:16 - [info] Started flows
I already updated nodejs to the version
v18.16.1, and I keep getting the same error
The error message you show still shows
So you are not using the nodejs you think you are
Fully remove nvm (I expect a search engine will tell you how to do that), and remove the .nvm folder. Then re-run the Ubuntu install script to get you going again.
Thanks for all the help, I was able to solve the problem, it was just that I did not have the official version of the dashboard nodes
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.