title: no node generated in node-red
body: <p>I try to solve the issue presented in 
  <a href="https://stackoverflow.com/questions/50236683/node-red-custom-nodes-waiting-for-missing-types">Node-red: custom nodes waiting for missing types</a>
  by creating a new node.</p>
  
  <p>I try to use the "mqtt.js example" to obtain a pre-configured mqtt-client/subscriber to add in my palette.</p>
  
  <p>So in the node folder I have the config file, named mqttConfig.json where are placed all data used by mqtt.js to enstablish the connection (ie. broker, topic, qos ...), the structure of this file is the same as in the previous one.</p>
  
  <pre><code>{
    "receiver": {
                 "broker":"127.0.0.1",
                 "topic":"topicRec",
                 "qos":"2"
                }
  }
  </code></pre>
  
  <p>Then I create the new preconf_mqtt.js that is:</p>
  
  <pre><code>var mqtt = require("/usr/local/lib/node_modules/node-red/node_modules/mqtt");
  var mqttConfig = require("mqttConfig");
  'use strict'
  
  module.exports = function(RED)
   {
    function ConfiguredMqttOutNode(config)
        {
         RED.nodes.createNode(this,config);
         var node = this;
  
         var m = mqttConf.receiver;
  
         this.topic = m.topic;
         this.qos = parseInt(m.qos);
         if (isNaN(this.qos) || this.qos &lt; 0 || this.qos &gt; 2)
            this.qos = 2;
         this.broker = m.broker;
         this.client = mqtt.connect(this.broker);
         this.client.subscribe(this.topic);
  
         this.client.on('message', function (topic, message) {
              var msg = {};
              msg.topic = this.topic;
              msg.payload = JSON.stringify(message);
              node.send(msg);
              });
  
    }
    RED.nodes.registerType("configured-mqtt-out",ConfiguredMqttOutNode);
   }
  </code></pre>
  
  <p>While the preconf_mqtt.html that is:</p>
  
  <pre><code>     &lt;script type="text/javascript"&gt;
          RED.nodes.registerType('configured-mqtt-out',{
            category: 'processing',
            color: '#a6bbcf',
             defaults: {
             name: {value:""}
          },
           inputs:0,
           outputs:1,
           icon: "bridge.png",
           label: function() 
           {
             return this.name||"c-mqtt-out";
           }
          }); 
      &lt;/script&gt;
  
      &lt;script type="text/x-red" data-template-name="configured-mqtt-out"&gt;
         &lt;div class="form-row"&gt;
            &lt;label for="node-input-name"&gt;&lt;i class="icon-tag"&gt;&lt;/i&gt; Name&lt;/label&gt;
            &lt;input type="text" id="node-input-name" placeholder="Name"&gt;
         &lt;/div&gt;
      &lt;/script&gt;
  
      &lt;script type="text/x-red" data-help-name="configured-mqtt-out"&gt;
          &lt;p&gt;Pre-configured MQTT subscriber&lt;/p&gt;
      &lt;/script&gt;
  </code></pre>
  
  <p>No matter when I try to install program:</p>
  
  <pre><code>ute@preprocnr:~/.node-red$ sudo npm install /home/ute/mqtt_rules_definer
  
  &gt; node-red-dashboard@2.9.1 postinstall /home/ute/.node-red/node_modules/node-red-dashboard
  &gt; node fixfa.js
  
  node-red-project@0.0.1 /home/ute/.node-red
  ├─┬ mqtt@2.18.0
  │ ├─┬ concat-stream@1.6.2
  │ │ └─┬ readable-stream@2.3.6
  │ │   ├── isarray@1.0.0
  │ │   └── string_decoder@1.1.1
  │ ├─┬ help-me@1.1.0
  │ │ ├─┬ glob-stream@6.1.0
  │ │ │ ├─┬ ordered-read-streams@1.0.1
  │ │ │ │ └─┬ readable-stream@2.3.6
  │ │ │ │   ├── isarray@1.0.0
  │ │ │ │   └── string_decoder@1.1.1
  │ │ │ ├─┬ pumpify@1.5.0
  │ │ │ │ └── pump@2.0.1
  │ │ │ └─┬ readable-stream@2.3.6
  │ │ │   ├── isarray@1.0.0
  │ │ │   └── string_decoder@1.1.1
  │ │ └─┬ through2@2.0.3
  │ │   └─┬ readable-stream@2.3.6
  │ │     ├── isarray@1.0.0
  │ │     └── string_decoder@1.1.1
  │ ├─┬ mqtt-packet@5.6.0
  │ │ └─┬ bl@1.2.2
  │ │   └─┬ readable-stream@2.3.6
  │ │     ├── isarray@1.0.0
  │ │     └── string_decoder@1.1.1
  │ ├─┬ readable-stream@2.3.6
  │ │ ├── isarray@1.0.0
  │ │ └── string_decoder@1.1.1
  │ └─┬ websocket-stream@5.1.2
  │   ├─┬ duplexify@3.6.0
  │   │ └─┬ readable-stream@2.3.6
  │   │   ├── isarray@1.0.0
  │   │   └── string_decoder@1.1.1
  │   └─┬ readable-stream@2.3.6
  │     ├── isarray@1.0.0
  │     └── string_decoder@1.1.1
  ├── mqtt_rules_definer@1.0.0  extraneous
  ├── node-red-dashboard@2.9.1  extraneous
  └── rule-definer@1.0.0  extraneous
  
  npm WARN node-red-project@0.0.1 No repository field.
  npm WARN node-red-project@0.0.1 No license field.
  ute@preprocnr:~/.node-red$ node-red
  </code></pre>
  
  <p>And node-red not show any particular error/warning when I start it:</p>
  
  <pre><code>16 May 15:21:23 - [info]
  
  Welcome to Node-RED
  ===================
  
  16 May 15:21:23 - [info] Node-RED version: v0.18.4
  16 May 15:21:23 - [info] Node.js  version: v4.2.6
  16 May 15:21:23 - [info] Linux 4.4.0-124-generic x64 LE
  16 May 15:21:23 - [info] Loading palette nodes
  16 May 15:21:23 - [info] Dashboard version 2.9.1 started at /ui
  16 May 15:21:23 - [warn] ------------------------------------------------------
  16 May 15:21:23 - [warn] [node-red/rpi-gpio] Info : Ignoring Raspberry Pi 
  specific node
  16 May 15:21:23 - [warn] [node-red-node-twitter/twitter] ReferenceError: 
  Invalid left-hand side in assignment
  16 May 15:21:23 - [warn] ------------------------------------------------------
  16 May 15:21:23 - [info] Settings file  : /home/ute/.node-red/settings.js
  16 May 15:21:23 - [info] User directory : /home/ute/.node-red
  16 May 15:21:23 - [info] Server now running at http://127.0.0.1:1880/
  16 May 15:21:23 - [info] Active project : pre-proc
  16 May 15:21:23 - [info] Flows file     : /home/ute/.node-red/projects/pre- proc/preprocessor.json
  </code></pre>
  
  <p>But the node is not present in my palette and I don't know what to do to fix it.
  Please, help me,
  Kind regards,
  Gianluca</p>
  
  <p>[EDIT]
  I forgot to add the nodes in package :S
  I had it and then I obtain the following warning, starting node-red:</p>
  
  <pre><code>16 May 16:36:41 - [warn] ------------------------------------------------------
  16 May 16:36:41 - [warn] [node-red/rpi-gpio] Info : Ignoring Raspberry Pi specific node
  16 May 16:36:41 - [warn] [node-red-node-twitter/twitter] ReferenceError: 
  Invalid left-hand side in assignment
  16 May 16:36:41 - [warn] [mqtt_rules_definer/mqtt_rules_definer] SyntaxError: Unexpected token .
  16 May 16:36:41 - [warn] ------------------------------------------------------
  </code></pre>
  
  <p>And the node is not generated...</p>