Uninstalling uibuilder node

I was trying to get the uibuilder node to work to implement a custom dashboard. I got to this page:

So instead, at first I tried removing and disabling from the Palette.
Then I did this:

npm uninstall node-red-contrib-uibuilder

The same thing results:
image

How do I get this node to work? Or how do I completely uninstall it?

Hi, you might want to check your Node-RED log to see if something went wrong with the installation. I've never seen any installed node give that error. Don't know if @knolleary has seen that before?

Normally you would install uibuilder, add a uibuilder node to a flow, open it change any settings you want, close it and deploy. Only after the deploy will the URL be usable.

H:\>node-red
16 Dec 15:31:44 - [info]

Welcome to Node-RED
===================

16 Dec 15:31:44 - [info] Node-RED version: v1.2.6
16 Dec 15:31:44 - [info] Node.js  version: v14.15.0
16 Dec 15:31:44 - [info] Windows_NT 10.0.19041 x64 LE
16 Dec 15:31:44 - [info] Loading palette nodes
16 Dec 15:31:46 - [info] Dashboard version 2.23.4 started at /ui
16 Dec 15:31:46 - [warn] ------------------------------------------------------
16 Dec 15:31:46 - [warn] [node-red-contrib-uibuilder/uibuilder] Error: Cannot find module 'fs-extra'
Require stack:
- C:\Users\auraynar\.node-red\node_modules\node-red-contrib-uibuilder\nodes\uiblib.js
- C:\Users\auraynar\.node-red\node_modules\node-red-contrib-uibuilder\nodes\uibuilder.js
- C:\Users\auraynar\AppData\Roaming\npm\node_modules\node-red\node_modules\@node-red\registry\lib\loader.js
- C:\Users\auraynar\AppData\Roaming\npm\node_modules\node-red\node_modules\@node-red\registry\lib\index.js
- C:\Users\auraynar\AppData\Roaming\npm\node_modules\node-red\node_modules\@node-red\runtime\lib\nodes\index.js
- C:\Users\auraynar\AppData\Roaming\npm\node_modules\node-red\node_modules\@node-red\runtime\lib\index.js
- C:\Users\auraynar\AppData\Roaming\npm\node_modules\node-red\lib\red.js
- C:\Users\auraynar\AppData\Roaming\npm\node_modules\node-red\red.js
16 Dec 15:31:46 - [warn] ------------------------------------------------------
16 Dec 15:31:46 - [info] Settings file  : C:\Users\auraynar\.node-red\settings.js
16 Dec 15:31:46 - [info] Context store  : 'default' [module=memory]
16 Dec 15:31:46 - [info] User directory : C:\Users\auraynar\.node-red
16 Dec 15:31:46 - [warn] Projects disabled : editorTheme.projects.enabled=false
16 Dec 15:31:46 - [info] Flows file     : C:\Users\auraynar\.node-red\flows_ENQ131.json
16 Dec 15:31:46 - [info] Server now running at http://127.0.0.1:1880/
16 Dec 15:31:46 - [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.
---------------------------------------------------------------------

16 Dec 15:31:46 - [info] Starting flows
16 Dec 15:31:46 - [info] Started flows

Did npm install fs-extra and it looks like the same result.

OK, something went really wrong with the installation!

  "dependencies": {
    "body-parser": "^1.19.0",
    "express-validator": "^6.8.0",
    "fs-extra": "^9.0.1",
    "jsonwebtoken": "^8.5.1",
    "serve-index": "^1.9.1",
    "serve-static": "^1.14.1",
    "socket.io": "^2.3.0"
  },

As you can see, fs-extra is a dependency and should have been installed when uibuilder was installed.

Can you check to see if there is an npm error log in the C:\Users\auraynar\.node-red folder?

While you are in that folder at the command line, I would stop Node-RED, run npm remove node-red-contrib-uibuilder then, assuming no errors are generated, run npm install node-red-contrib-uibuilder and check for errors. If it is OK (some warnings are generated but there shouldn't be any errors), restart Node-RED and try again.


Needless to say that this doesn't normally happen and I've never seen it before. If the npm stats are to be believed, uibuilder gets over a thousand installs/updates a month.

image

I don't see any.

OK, use a command prompt, go to that directory and follow the other directions then.

When you tried that did you run it from within your .node-red folder, and then restart node-red and refresh the browser window?

I believe so: cd C:\Users\auraynar\.node-red. I keep getting H:\ though (not a local folder).

This did not work either. I was so hopeful for it though :slight_smile:

Ah.

So, is this a work PC by any chance?

Yes, but I think I can run things with Admin privileges.

It looks like your c: drive is redirected to a network drive. Possibly, npm is getting confused by this, I've not tried Node-RED or node.js in that kind of configuration and without knowledge of exactly how your IT department has set it up, this may be tricky.

What errors did you get when you tried to remove uibuilder? And what errors when you try to reinstall it.

Also note that you don't actually have to run npm remove. You can if you need to simply delete the folder that is inside C:\Users\auraynar\.node-red\node_modules (or at least it should do if this was a normal setup).

None, just warnings.

And the errors when you install?

H:\>npm install node-red-contrib-uibuilder

> node-red-contrib-uibuilder@3.0.0 postinstall H:\node_modules\node-red-contrib-uibuilder
> node ./bin/uibpreinstalljs

========================= [UIBUILDER POSTINSTALL] =========================
Pre-installing vue & bootstrap-vue
Please ignore warnings about missing peer dependencies for jquery, vue, bootstrap-vue
   ... this will take a minute ...

npm WARN saveError ENOENT: no such file or directory, open 'H:\package.json'
npm WARN enoent ENOENT: no such file or directory, open 'H:\package.json'
npm WARN !invalid#1 No description
npm WARN !invalid#1 No repository field.
npm WARN !invalid#1 No README data
npm WARN !invalid#1 No license field.


Pre-install completed with warnings
===========================================================================

[            ......] \ postinstall: sill lifecycle node-red-contrib-uibuilder@3.0npm WARN saveError ENOENT: no such file or directory, open 'H:\package.json'
[            ......] - postinstall: WARN saveError ENOENT: no such file or directnpm WARN enoent ENOENT: no such file or directory, open 'H:\package.json'
npm WARN node-red-contrib-uibuilder@3.0.0 requires a peer of bootstrap-vue@^2.17.3 but none is installed. You must install peer dependencies yourself.
npm WARN !invalid#1 No description
npm WARN !invalid#1 No repository field.
npm WARN !invalid#1 No README data
npm WARN !invalid#1 No license field.

+ node-red-contrib-uibuilder@3.0.0
updated 1 package and audited 273 packages in 68.473s

8 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

I don't think so.

auraynar = H:

Right, that confirms it. You have a mismatch between where Node-RED thinks things are and where they actually are.

You need to start Node-RED pointing it at the real userDir because although you think your userDir is in the normal place of ~/.node-red, it absolutely isn't.


To be honest, with that setup, I think you will be better off running a local install of Node-RED rather than a global install. Check out the alternate installer on my GitHub for details.

1 Like

Or tell NPM where to put npmglobal & npmglobal-cache - this is how i handle it in corporate env.

@adamelli see info here on windows install & npm global/cache location.

1 Like

Thank you all. I just went into the app data folder (entered %APPDATA% in File Explorer), searched "uibuilder", deleted them all and re-installed it in the Palette.

localhost:1880/uibuilder works too!

In the future, I will probably have to do alternate installer deal or install at a npm global/cache location. So that's useful.

1 Like