# Waiting for missing types to be registered

**URL:** https://discourse.nodered.org/t/waiting-for-missing-types-to-be-registered/9282
**Category:** Dashboard
**Created:** [21 March 2019 16:06 UTC](https://discourse.nodered.org/t/waiting-for-missing-types-to-be-registered/9282 "2019-03-21T16:06:21Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![trujillo](https://avatars.discourse-cdn.com/v4/letter/t/e9bcb4/32.png) [@trujillo](https://discourse.nodered.org/u/trujillo)
#### Post date: [21 March 2019 16:06 UTC](https://discourse.nodered.org/t/waiting-for-missing-types-to-be-registered/9282/1 "2019-03-21T16:06:21Z")

</div>

Hello,

I've some problems with a node that I've made. This node use request to do a simple get request to any server. When I used the node for first time, it run well. Now, I change de project to add new nodes and the first node doesn't work. When I try it, I recieve a notification that said: "Waiting for missing types to be registered: fiware-in" (fiware-in is the name of the node.

I try a lot of solutions, but anything runs.

Thanks!

---

<div class="post-metadata">

### Author: ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)
#### Post date: [21 March 2019 16:09 UTC](https://discourse.nodered.org/t/waiting-for-missing-types-to-be-registered/9282/2 "2019-03-21T16:09:45Z")

</div>

Hi @trujillo - welcome.

That means Node-RED has not been able to load your custom module for some reason. It will have reported any errors it hit trying to load your node in the log - so that's the place to look first.

---

<div class="post-metadata">

### Author: ![trujillo](https://avatars.discourse-cdn.com/v4/letter/t/e9bcb4/32.png) [@trujillo](https://discourse.nodered.org/u/trujillo)
#### Post date: [21 March 2019 16:21 UTC](https://discourse.nodered.org/t/waiting-for-missing-types-to-be-registered/9282/3 "2019-03-21T16:21:55Z")

</div>

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/8/84b6a39131538872de0c2b84325b4620c47a48b2.png)

Before, I can see the modules in the command windows but now I can't. However, I can see the nodes in the palette and I can use it in the flow. When I deploy, the problems starts.

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [21 March 2019 16:45 UTC](https://discourse.nodered.org/t/waiting-for-missing-types-to-be-registered/9282/4 "2019-03-21T16:45:58Z")

</div>

Show us the whole log, up to when the error occurs. If possible please copy/paste here from the terminal. You can use Ctrl+Shift+C to copy from the terminal.

---

<div class="post-metadata">

### Author: ![trujillo](https://avatars.discourse-cdn.com/v4/letter/t/e9bcb4/32.png) [@trujillo](https://discourse.nodered.org/u/trujillo)
#### Post date: [22 March 2019 08:11 UTC](https://discourse.nodered.org/t/waiting-for-missing-types-to-be-registered/9282/5 "2019-03-22T08:11:11Z")

</div>

This is my cmd when I deploy the node:

C:\Users\Trujillo.node-red\>node-red scratch.js  
22 Mar 09:07:53 - [info]

# Welcome to Node-RED

22 Mar 09:07:53 - [info] Node-RED version: v0.20.2  
22 Mar 09:07:53 - [info] Node.js version: v10.15.3  
22 Mar 09:07:53 - [info] Windows\_NT 10.0.17134 x64 LE  
22 Mar 09:07:54 - [info] Loading palette nodes  
22 Mar 09:07:56 - [warn] rpi-gpio : Raspberry Pi specific node set inactive  
22 Mar 09:07:56 - [info] Settings file : \Users\Trujillo.node-red\settings.js  
22 Mar 09:07:56 - [info] Context store : 'default' [module=memory]  
22 Mar 09:07:56 - [info] User directory : \Users\Trujillo.node-red  
22 Mar 09:07:56 - [warn] Projects disabled : editorTheme.projects.enabled=false  
22 Mar 09:07:56 - [info] Flows file : C:\Users\Trujillo.node-red\scratch.js  
22 Mar 09:07:56 - [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.

22 Mar 09:07:56 - [info] Starting flows  
22 Mar 09:07:56 - [info] Started flows  
22 Mar 09:07:56 - [info] Server now running at [http://127.0.0.1:1880/](http://127.0.0.1:1880/)  
22 Mar 09:09:02 - [info] Stopping flows  
22 Mar 09:09:02 - [info] Stopped flows  
22 Mar 09:09:02 - [info] Waiting for missing types to be registered:  
22 Mar 09:09:02 - [info] - fiware-in  
22 Mar 09:09:06 - [info] Stopping flows  
22 Mar 09:09:06 - [info] Stopped flows

@Colin Is this that you said it?

---

<div class="post-metadata">

### Author: ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)
#### Post date: [22 March 2019 08:37 UTC](https://discourse.nodered.org/t/waiting-for-missing-types-to-be-registered/9282/6 "2019-03-22T08:37:30Z")

</div>

Given there are no errors at the start - around the 'Loading palette nodes' line - then the most simple explanation is it hasn't found a module that provides the type `fiware-in`.

If you take a look in the file `~/.node-red/.config.json` you'll see a list of all the modules node-red has loaded and where they came from. Check your module is listed in there.

---

<div class="post-metadata">

### Author: ![trujillo](https://avatars.discourse-cdn.com/v4/letter/t/e9bcb4/32.png) [@trujillo](https://discourse.nodered.org/u/trujillo)
#### Post date: [22 March 2019 09:01 UTC](https://discourse.nodered.org/t/waiting-for-missing-types-to-be-registered/9282/7 "2019-03-22T09:01:12Z")

</div>

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/0/0639dadcfd6d7a4e97e2f5d9f6627e063fd691a5.png)

The node is in the file that you comment. You can see fiware-out and fiware-in, the first runs well but the second has the problem and I don't know how repair it.

Thanks!

---

<div class="post-metadata">

### Author: ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)
#### Post date: [22 March 2019 09:07 UTC](https://discourse.nodered.org/t/waiting-for-missing-types-to-be-registered/9282/8 "2019-03-22T09:07:15Z")

</div>

The runtime first identifies what types a node provides by scanning its html file - that is where the array of types comes from that you can see on line 502 in that screenshot.

It assumes the node's javascript file will actually register a node of that type.

But the error you are hitting tells us the javascript is _not_ calling `RED.nodes.registerType()` with a type of `"fiware-in"`. That would be the next thing for you to check.

---

<div class="post-metadata">

### Author: ![trujillo](https://avatars.discourse-cdn.com/v4/letter/t/e9bcb4/32.png) [@trujillo](https://discourse.nodered.org/u/trujillo)
#### Post date: [22 March 2019 09:17 UTC](https://discourse.nodered.org/t/waiting-for-missing-types-to-be-registered/9282/9 "2019-03-22T09:17:28Z")

</div>

This is the beginning of mi fiware-in.html. In the js file, RED.nodes.registerType() has 'fiware-in' too.

Thanks a lot for your comments!

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/8/8605bce047bfb7b6ca0e8d0f68bb474623d4ae6f.png)

---

<div class="post-metadata">

### Author: ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)
#### Post date: [22 March 2019 09:18 UTC](https://discourse.nodered.org/t/waiting-for-missing-types-to-be-registered/9282/10 "2019-03-22T09:18:19Z")

</div>

You've shown the .html file - but its the .js file that determines what gets loaded in the runtime.

---

<div class="post-metadata">

### Author: ![trujillo](https://avatars.discourse-cdn.com/v4/letter/t/e9bcb4/32.png) [@trujillo](https://discourse.nodered.org/u/trujillo)
#### Post date: [22 March 2019 09:25 UTC](https://discourse.nodered.org/t/waiting-for-missing-types-to-be-registered/9282/11 "2019-03-22T09:25:25Z")

</div>

Ok, the js has an error.

Thank you very much! I solve my problem!

Thanks!

---

<div class="post-metadata">

### Author: ![peret2000](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/peret2000/32/20682_2.png) [@peret2000](https://discourse.nodered.org/u/peret2000)
#### Post date: [12 April 2020 16:45 UTC](https://discourse.nodered.org/t/waiting-for-missing-types-to-be-registered/9282/12 "2020-04-12T16:45:38Z")

</div>

Hello,  
I am facing exactly the same issue. I am learning how to create nodes, and having this same error. the difference is, as far as I can see, that I am declaring correctly the call to the neccessary type (in my case 'example') from `RED.nodes.registerType()`.

This is the log of node-red:

```auto
Welcome to Node-RED
===================

12 Apr 18:24:22 - [info] Node-RED version: v1.0.4
12 Apr 18:24:22 - [info] Node.js version: v12.16.1
12 Apr 18:24:22 - [info] Linux 4.15.0-1063-aws x64 LE
12 Apr 18:24:22 - [info] Loading palette nodes
12 Apr 18:24:23 - [info] Worldmap version 2.2.1
12 Apr 18:24:24 - [info] Dashboard version 2.19.4 started at /ui
12 Apr 18:24:24 - [warn] rpi-gpio : Raspberry Pi specific node set inactive
12 Apr 18:24:24 - [info] Settings file : /home/usuario/.node-red/settings.js
12 Apr 18:24:24 - [info] Context store : 'storeInFile' [module=localfilesystem]
12 Apr 18:24:24 - [info] Context store : 'default' [module=memory]
12 Apr 18:24:24 - [info] User directory : /home/usuario/.node-red
12 Apr 18:24:24 - [info] Server now running at http://127.0.0.1:20481/
12 Apr 18:24:24 - [info] Active project : NodeRED
12 Apr 18:24:24 - [info] Flows file : /home/usuario/.node-red/projects/NodeRED/flows_raspberrypi.json
12 Apr 18:24:24 - [info] Waiting for missing types to be registered:
12 Apr 18:24:24 - [info] - example

```

This is the .js file:

```auto
module.export = function(RED) {

        function ExampleNode(config) {
                RED.nodes.createNode(this,config);
                var node = this;
        }

        RED.nodes.registerType("example", ExampleNode);

        this.on("input"), function(msg) {
                if (typeof msg.payload === "string") {
                        msg.payload = msg.payload.toLowerCase();
                        node.send(msg);
                } else {
                        node.error("Payload is not a String", msg);
                }
        }

}

```

The .html:

```auto
<script type="text/javascript">
    RED.nodes.registerType('example', {
        color: "#62796E",
        category: 'function',
        defaults: {
            name: {value:""}
        },
        inputs: 1,
        outputs: 1,
        icon: "inject.png",
        label: function() {
                return this.name || "example";
        }
});
</script>

<script type="text/x-red" data-template-name="example">
        <div class="form-row">
                <label for="node-input-name"><i class="fa fa-tag"></i> Name </label>
        </div>
</script>

<script type="text/x-red" data-help-name="example">
        <p>Converts msg.payload to a lower-case string.</p>
</script>

```

The package.json file:

```auto
{
  "name": "node-red-contrib-example",
  "version": "1.0.0",
  "description": "",
  "author": "",
  "license": "ISC",
  "node-red": {
    "nodes": {
      "example": "exampleNode.js"
    }
  }
}

```

It seems to be correctly loaded by node-red (fragment of : $HOME/.node-red/.config.json):

```auto
  "node-red-contrib-example": {
   "name": "node-red-contrib-example",
   "version": "1.0.0",
   "local": true,
   "nodes": {
    "example": {
     "name": "example",
     "types": [
      "example"
     ],
     "enabled": true,
     "local": true,
     "module": "node-red-contrib-example",
     "file": "/home/maq/.node-red/node_modules/node-red-contrib-example/exampleNode.js"
    }
   }
  }
 },

```

Sorry I am sending a lot of data; just to show that I am considering all the possible mistakes commented here. After a number of hours trying different options, I haven't managed to put the node to work. I have to say that the node can be selected from the palette, but it cannot deploy the code as it says "Flows stopped due to missing node types."

Thanks a lot in advance

---

<div class="post-metadata">

### Author: ![peret2000](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/peret2000/32/20682_2.png) [@peret2000](https://discourse.nodered.org/u/peret2000)
#### Post date: [13 April 2020 08:49 UTC](https://discourse.nodered.org/t/waiting-for-missing-types-to-be-registered/9282/13 "2020-04-13T08:49:18Z")

</div>

I have managed to see the problem; .js code was wrong. Two errors:

- Using module.export instead of module.exports
- Code inside exported function was not correc. This is teh correct version:

```auto
module.exports = function(RED) {
        "use strict";

        function ExampleNode(config) {
                RED.nodes.createNode(this,config);

                var node = this;

                this.on("input"), function(msg) {
                        if (typeof msg.payload === "string") {
                                msg.payload = msg.payload.toLowerCase();
                                node.send(msg);
                        } else {
                                node.error("Payload is not a String", msg);
                        }
                }

        }

        RED.nodes.registerType("example", ExampleNode);

};

```

What is difficult to me is to detect these kind of errors: java script is too permisive with data, so you can declare or use data out of scope, and nothing happens. Thanks

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [27 April 2020 08:49 UTC](https://discourse.nodered.org/t/waiting-for-missing-types-to-be-registered/9282/14 "2020-04-27T08:49:18Z")

</div>

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