Opening node-red

I have done that to remove the custom node, but still it does not work!

Then maybe time to get drastic. Try creating a new local user and then run node-red under the new user. If that still doesn't work, you need to remove node-red completely and then reinstall.

Could you please tell me how to remove node-red completely?

npm remove -g node-red should do the job.

If that fails, you can manually delete the C:\Users\Admin\AppData\Roaming\npm\node_modules\node-red folder.

I applied npm remove -g node-red and now in `C:\Users\Admin\AppData\Roaming\npm\node_modules' node-red folder is not there, so it means that it is completely removed, right? so what is next?

Did you create a new local user? If not, do that now and switch to it.

Then reinstall Node-RED with npm install -g node-red --production --unsafe-perm.

Then from a command line, run node-red. That will create a new userDir folder at %USERPROFILE%\.node-red (if using cmd.exe, for PowerShell, you can use ~/.node-red).

Running node-red from the command line shows you the log output and at the start you get the URL for the editor. So open that in your browser.

Now you can add the nodes that you want using the palette manager in the editor. Keep an eye on the log output for any errors. Don't reinstall the node-red-contrib-netio node though as that was the one that caused the problems in the first place.

Once you are at a useful, stable place, remember that you can make a complete copy of the %USERPROFILE%\.node-red folder and if you get into problems, you can simply go back to it. It will be big so may take a while to copy (in Windows, best copied from the command line with Robocopy) but it has everything you need outside of the global installs. As a rule, keep global npm installs to a minimum.

1 Like

Thank you. It works now :slight_smile:

Hi @knolleary , as you mentioned that in my custom node, .HTML file is missing. I have added this file but how can I make sure that it is included? I am afraid to install this custom node and check it.

You need to test your node. The only way you can do that is by installing it and trying it out. You do not need to publish it to npm to test it.

If you have the node files in a folder on the node red server then you can install it locally by going to your .node-red folder and running
npm install /path/to/folder/node_red_contrib_the_node_name
then restart node-red. If there are problems then, in the .node-red folder
npm remove node_red_contrib_the_node_name
and restart node-red again.

thank you.
the path of My node is C:\Users\Masoud\npm-netionode
in the npm-netionode folder, I have created .json and .js and .html , license, and readme.
so I insert this in command , please see this photo:

now it is added in C:\Users\Masoud.node-red\node_modules but it dis not appear in node-red website !!
Did I something wrong?

Did you restart node-red? Also refresh the browser page.

If it still doesn't work then uninstall and then install it again and copy/paste the result here. Please copy/paste rather than screenshot. When pasting use the </> button at the top of the forum entry window.
Then stop node red and start it again and copy/paste the startup log here.

Then stop node-red and

Here it is:

C:\Users\Masoud>cd .node-red/

C:\Users\Masoud\.node-red>npm remove node-red-contrib-netio
removed 1 package and audited 2 packages in 0.512s
found 0 vulnerabilities


C:\Users\Masoud\.node-red>npm remove projectworknetio
removed 1 package in 0.421s
found 0 vulnerabilities

C:\Users\Masoud\.node-red>npm install C:\Users\Masoud\npm-netionode
+ node-red-contrib-netio@1.0.3
added 1 package from 1 contributor and audited 1 package in 0.426s
found 0 vulnerabilities


C:\Users\Masoud\.node-red>

And then I stop node red and start again but still the node is not the browser:


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

4 Feb 17:02:38 - [info] Node-RED version: v1.2.8
4 Feb 17:02:38 - [info] Node.js  version: v14.15.4
4 Feb 17:02:38 - [info] Windows_NT 10.0.19041 x64 LE
4 Feb 17:02:39 - [info] Loading palette nodes
4 Feb 17:02:40 - [info] Settings file  : C:\Users\Masoud\.node-red\settings.js
4 Feb 17:02:40 - [info] Context store  : 'default' [module=memory]
4 Feb 17:02:40 - [info] User directory : \Users\Masoud\.node-red
4 Feb 17:02:40 - [warn] Projects disabled : editorTheme.projects.enabled=false
4 Feb 17:02:40 - [info] Flows file     : \Users\Masoud\.node-red\flows_DESKTOP-GC83620.json
4 Feb 17:02:40 - [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.
---------------------------------------------------------------------

4 Feb 17:02:40 - [info] Starting flows
4 Feb 17:02:40 - [error] [split:e3bb9e39.587ae] Invalid split property: Error: invalid array split length: mas
4 Feb 17:02:40 - [info] Started flows
4 Feb 17:02:40 - [info] Server now running at http://127.0.0.1:1880/
4 Feb 17:09:09 - [info] Stopping flows
4 Feb 17:09:09 - [info] Stopped flows
Terminate batch job (Y/N)? Y

C:\Users\Masoud>node-red
4 Feb 17:09:24 - [info]

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

4 Feb 17:09:24 - [info] Node-RED version: v1.2.8
4 Feb 17:09:24 - [info] Node.js  version: v14.15.4
4 Feb 17:09:24 - [info] Windows_NT 10.0.19041 x64 LE
4 Feb 17:09:25 - [info] Loading palette nodes
4 Feb 17:09:26 - [info] Settings file  : C:\Users\Masoud\.node-red\settings.js
4 Feb 17:09:26 - [info] Context store  : 'default' [module=memory]
4 Feb 17:09:26 - [info] User directory : \Users\Masoud\.node-red
4 Feb 17:09:26 - [warn] Projects disabled : editorTheme.projects.enabled=false
4 Feb 17:09:26 - [info] Flows file     : \Users\Masoud\.node-red\flows_DESKTOP-GC83620.json
4 Feb 17:09:26 - [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.
---------------------------------------------------------------------

4 Feb 17:09:26 - [info] Starting flows
4 Feb 17:09:26 - [error] [split:e3bb9e39.587ae] Invalid split property: Error: invalid array split length: mas
4 Feb 17:09:26 - [info] Started flows
4 Feb 17:09:26 - [info] Server now running at http://127.0.0.1:1880/


Did you refresh the browser?

Does the node appear in Manage Pallete as installed?

Search for that node in the Editor and find out why it is creating an error. Is that your node or some other node type?

And please share your package.json and the .html and .js files somewhere so we can see what is wrong.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.