I need help "Type already registered"

Hi, I'm very new here in node-red so please bear with me.
Can someone help me with this? I don't know what will I do.

And can you also help me with the secretcredential. Thanks!!

Welcome to Node-RED ===================
26 Dec 10:24:55 - [info] Node-RED version: v1.0.3
26 Dec 10:24:55 - [info] Node.js version: v12.14.0
26 Dec 10:24:55 - [info] Windows_NT 10.0.18362 x64 LE 26 Dec 10:24:57 - [info] Loading palette nodes
Missing ENV var CONFIG_PATH
26 Dec 10:25:29 - [info] Dashboard version 2.19.3 started at /ui
26 Dec 10:25:30 - [warn]

26 Dec 10:25:30 - [warn] [node-red-node-sqlite/sqlite] Type already registered 26 Dec 10:25:30 - [warn]

26 Dec 10:25:30 - [info] Settings file : \Users\PROGRAMMER.node-red\settings.js
26 Dec 10:25:30 - [info] Context store : 'default' [module=memory]
26 Dec 10:25:30 - [info] User directory : \Users\PROGRAMMER.node-red
26 Dec 10:25:30 - [warn] Projects disabled : editorTheme.projects.enabled=false 26 Dec 10:25:30 - [info] Flows file : \Users\PROGRAMMER.node-red\flows_DESKTOP-NOPK4HG.json
26 Dec 10:25:30 - [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.

What have you done to get to this point?

The message suggests you have the sqlite node installed twice.

Don't worry about the credentialSecret message for now - it's something to deal with, but not an error. The message does tell you what to do and there have been previous threads about it on the forum you can find with a search.

My friend said that he already forgot what exactly he did.

He said that He just wants to try and know what is the difference between the SQLite and SQLite DB. So after installing the SQLite he also installed the SQLite DB. Suddenly he noticed that the SQLite node is already gone and now replaced with SQLite DB node.

He thought that everything is okay and he can easily uninstall the SQLite DB after trying it...

He tried to do the

npm uninstall node-red-node-sqlite
but nothing happens.

he also tried to delete and uninstall my node.js
and tried to install node-red again and he was hoping that everything will be okay.

he also deleted the node-modules folder.
I don't know where did he get that idea. :frowning:

Your original message says you are having the problem...where did your 'friend' come in?

I would suggest that you (or your friend) start from scratch and document step by set what he has done. I would also suggest he read the description of a node before installing it. The sqlitedf node:

Sends SQL queries to an SQLite cloud database provided as a service at https://www.sqlitedb.com/

So what exactly is the problem that your friend has now? If he is still having the type already registered error then post here the contents of the file .node-red/package.json

I and my friend do have a dashboard project using node-red. I am the one who leads in our project. And he asked me if it is okay if he will try to do our dashboard because seriously this node-red is giving me some headaches already... So I let him do our dashboard. Then that's what happened.

Can we reset our node-red so that we can start again from scratch?

Thanks!

Still do have the same problem as the "Type already registered" error.

{
"name": "node-red-project",
"description": "A Node-RED Project",
"version": "0.0.1",
"private": true,
"dependencies": {
"node-red-contrib-alasql": "~1.1.0",
"node-red-contrib-sqlitedb": "~1.4.0",
"node-red-dashboard": "~2.19.3",
"node-red-node-mysql": "0.0.19",
"node-red-node-rbe": "~0.2.6",
"node-red-node-sqlite": "~0.4.1",
"node-red-node-tail": "~0.1.0"
}
}

Thank you so much!

As stated earlier, you have installed both node-red-contrib-sqlitedb AND node-red-node-sqlite. Both register a node with the type sqlitedb.

You have to decide which one to use, and uninstall the other one using npm uninstall.

If you use npm make sure you are in the .node-red directory. Alternatively do it from the palette manager within node red.

I tried the npm uninstall. Then this happens

C:\Users\PROGRAMMER>npm uninstall node-red-contrib-sqlitedb
npm WARN saveError ENOENT: no such file or directory, open
'C:\Users\PROGRAMMER\package.json'
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\PROGRAMMER\package.json'
npm WARN PROGRAMMER No description
npm WARN PROGRAMMER No repository field. npm WARN PROGRAMMER No README data
npm WARN PROGRAMMER No license field.
audited 1169 packages in 7.773s

1 package is looking for funding


run npm fund for details
found 2 moderate severity vulnerabilities


run npm audit fix to fix them, or npm audit for details

after the npm uninstall I just follow what it said...
So I did the npm audit fix.. then this one shows

npm ERR! code EAUDITNOPJSON
npm ERR! audit No package.json found: Cannot audit a project without a package.json npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\PROGRAMMER\AppData\Roaming\npm-cache_logs\2020-01-08T07_58_06_621Z-debug.log

You ran the command in the wrong directory.

As Colin said, you must run it in your Node-RED user directory: \Users\PROGRAMMER.node-red

I'm Sorry. I didn't notice that I ran it in a wrong directory.
Anyway, this what happens after I uninstall the SQLite DB.

C:\Users\PROGRAMMER.node-red> npm uninstall node-red-contrib-sqlitedb
removed 5 packages and audited 460 packages in 73.511s
1 package is looking for funding
run npm fund for details found 0 vulnerabilities
C:\Users\PROGRAMMER.node-red> node-red
8 Jan 16:31:33 - [info]
Welcome to Node-RED

===================
8 Jan 1631:34 - [info] Node-RED version: v1.0.3
8 Jan 16:31:34 - [info] Node.js version: v12.14.0
8 Jan 16:31:34 - [info] Windows_NT 10.0.18362 x64 LE
8 Jan 16:31:43 - [info] Loading palette nodes
Missing ENV var CONFIG_PATH
8 Jan 16:33:54 - [info] Dashboard version 2.19.3 started at /ui
8 Jan 16:33:56 - [warn] Missing node modules:
8 Jan 16:33:56 - [warn] - node-red-contrib-sqlitedb (1.4.0): sqlitedb
8 Jan 16:33:56 - [info] Removing modules from config
8 Jan 16:33:56 - [info] Settings file : \Users\PROGRAMMER.node-red\settings.js
8 Jan 16:33:56 - [info] Context store : 'default' [module=memory]
8 Jan 16:33:57 - [info] User directory : \Users\PROGRAMMER.node-red
8 Jan 16:33:57 - [warn] Projects disabled : editorTheme.projects.enabled=false
8 Jan 16:33:57 - [info] Flows file : \Users\PROGRAMMER.node-red\flows_DESKTOP-NOPK4HG.json
8 Jan 16:33:58 - [warn]

Great - so its all working then.

The 'Missing node modules' warning is a bit confusing. It just means that you had been using it but have removed it outside of node-red. It is not the same as the 'Flows stopped due to missing nodes' message which means that you have a node in the flow that node-red cannot find.